Title: Implement imagesLoaded script
Last modified: August 20, 2016

---

# Implement imagesLoaded script

 *  Resolved [throwingmarbles](https://wordpress.org/support/users/throwingmarbles/)
 * (@throwingmarbles)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/implement-imagesloaded-script/)
 * Hi,
    Another question about this theme. I have altered it so that images don’t
   always have the same height. This occasionally causes Isotope blocks to overlap,
   if they get their position before the images are loaded. I use [Infinite Scroll](http://wordpress.org/extend/plugins/infinite-scroll/)
   to load them (and unfortunately had to disable the filter for the time being 
   since the two don’t combine very well)
 * I’ve tried figuring out where to call the imagesLoaded function that is already
   integrated in jquery.isotope.min.js, but I haven’t been able to make it work…
 * Any pointers would be greatly appreciated.
 * Kind Regards,
    Marloes Hautmann

Viewing 1 replies (of 1 total)

 *  Thread Starter [throwingmarbles](https://wordpress.org/support/users/throwingmarbles/)
 * (@throwingmarbles)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/implement-imagesloaded-script/#post-3535741)
 * This always happens, I mess around for days and nights without luck, finally 
   pop the question online, try once more out of pure frustration and finally get
   it to work…
 * I had to add the imagesLoaded call to your script as well as the Infinite Scroll
   one. In case anyone else searches, I edited this part in scripts.js:
 *     ```
       jQuery(function(){
       var $container = jQuery('#post-listing');
       $container.imagesLoaded( function(){
       	$container.isotope({
       		 itemSelector: '.item',
       		// resizable: false,
       		 masonry : {
       	        cornerStampSelector: '.corner-stamp',
       			//columnWidth: 240
       			columnWidth: $container.width() / 4
   
       	      }
       	});
       });
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Implement imagesLoaded script’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sampression-lite/2.3/screenshot.
   png)
 * Sampression Lite
 * [Support Threads](https://wordpress.org/support/theme/sampression-lite/)
 * [Active Topics](https://wordpress.org/support/theme/sampression-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sampression-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sampression-lite/reviews/)

## Tags

 * [imagesloaded](https://wordpress.org/support/topic-tag/imagesloaded/)
 * [infinitescroll](https://wordpress.org/support/topic-tag/infinitescroll/)
 * [sampression](https://wordpress.org/support/topic-tag/sampression/)

 * 1 reply
 * 1 participant
 * Last reply from: [throwingmarbles](https://wordpress.org/support/users/throwingmarbles/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/implement-imagesloaded-script/#post-3535741)
 * Status: resolved