I’ve successfully implemented a filter using the jQuery isotope plugin which filters out the content accordingly. The only problem is that the click functions attached to the filtered content no longer work after the filter has been implemented.
Here’s my code:
jQuery(document).ready(function(){
var jQuerycontainer = jQuery('#projectimages');
jQuerycontainer.isotope({
itemSelector: '.shown',
animationEngine: 'css',
masonry: {
columnWidth: 2
}
});
jQuery('#menu a').click(function(){
var selector = jQuery(this).attr('data-filter');
jQuerycontainer.isotope({ filter: selector });
return false;
});
});
jQuery(document).ready(function(){
jQuery(".hidden").hide();
jQuery(".pics-hidden").hide();
jQuery('.wp-image-111').click(function() {
jQuery('.post-98').addClass('shown').removeClass('hidden').delay(300).fadeIn(100);
jQuery('#projectimages').isotope('reloadItems').isotope();
});
});
After the filter has been implemented, the click functions attached to (‘.wp-image-111’) no longer works, is there a reason for this? If so is there a way to resolve it?
should be
});
you cannot remove id.