/** * functionality specific to newyork theme shortcode plugin. * * provides helper functions to enhance the theme experience. */ (function($) { // using strict mode "use strict"; $(window).load(function() { $('.gallery .packery').each(function(){ var id = 1 * $(this).attr('data-id'); var pckry = new packery( document.queryselector( '#packery_'+id ), { /* options */ itemselector: '.gallery_item', transitionduration: '0', columnwidth: '#grid-sizer-'+id }); /* fix needed when using images */ $(this).parents('.gallery').removeclass('loading'); pckry.layout(); $(this).css('opacity',0); $(this).animate({opacity: 1},500); }); $(window).resize(); }); })(jquery);