javascript - Masonary reload item not working -


i trying gallery portfolio of masonry , custom click event. can hide show images click event, when hide show event complete masonry not reset again.

link

here jquery code:

var pmo = "#p-masonry_outer"; var ppt = "#p-portfolio_typs"; $('' + ppt + ' li span').on('click', function() {             $('' + ppt + ' li span').removeclass('p-active_work');             $(this).addclass('p-active_work');             var workrel = $(this).data("cat");             if (workrel != "0") {                 $("" + pmo + " > div").hide();                 $(".p-masonry a").attr('data-lightbox', '');                 $("" + pmo + " > div").each(function() {                     var workattrstrip = $(this).data('cat');                     var workattr = workattrstrip.split(",");                     if ($.inarray(workrel + "", workattr) !== -1) {                         $(this).show;                     }                 });                 var $container = $('.js-masonry');                 $container.imagesloaded(function() {                     $container.masonry();                 });             } else {                 $("" + pmo + " > div").fadein("slow");             }             return false;         } 


Comments