The following part of my js displays and hides the an ul class called gallery_item_details_list which works just fine.
var detailsBlock = $(location.hash);
$(".gallery_item_details_list .gallery_item_details").css("display", "none");
detailsBlock.css("display", "block");
var galleryItem = $("#gallery-item-" + location.hash.substr(17));
detailsBlock.find(".prev").attr("href", (galleryItem.prevAll(":not('.isotope-hidden')").first().length ? galleryItem.prevAll(":not('.isotope-hidden')").first().find(".open_details").attr("href") : $(".gallery:not('.horizontal_carousel')").children(":not('.isotope-hidden')").last().find(".open_details").attr("href")));
detailsBlock.find(".next").attr("href", (galleryItem.nextAll(":not('.isotope-hidden')").first().length ? galleryItem.nextAll(":not('.isotope-hidden')").first().find(".open_details").attr("href") : $(".gallery:not('.horizontal_carousel')").children(":not('.isotope-hidden')").first().find(".open_details").attr("href")));
var visible=parseInt($(".gallery_item_details_list").css("height"))==0 ? false : true;
var galleryItemDetailsOffset;
if(!visible)
{
$(".gallery_item_details_list").css("display", "block").animate({height:detailsBlock.height()}, 500, 'easeOutQuint', function(){
$(this).css("height", "100%");
$(location.hash + " .image_carousel").trigger("updateSizesCustom");
});
My question is now, how can this code be modified to display / hide one more additional class called for example contact_block? I've tried to change the code to:
$(".gallery_item_details_list .gallery_item_details .contact_block").css("display", "none");
and
$(".gallery_item_details_list .contact_block").css("display", "block").animate({height:detailsBlock.height()}, 500, 'easeOutQuint', function(){
however this does not seem to work.
Some expert help would be truly appreciated.