0

Hi I'm using Isotope with some images. My images are various sizes, ranging from squares to panoramic images that fill the full width of the container.

I was wondering how I could have isotope reLayout the images after insertion of new images, since I do not want large, ugly gaps between my photos.

Here is my code that isn't working

function( newElements ) {
      $container.isotope( 'insert', $( newElements ), function(){
        $container.isotope( 'reLayout'); 
      }); 
    }

Thanks for all of your help!

nggonzalez
  • 160
  • 1
  • 8

1 Answers1

0

try this code:

$container.append($( newElements )).isotope('insert', $( newElements ));
grigno
  • 3,128
  • 4
  • 35
  • 47