2013-08-29 40 views
0

嗨我用一些圖像同位素。我的圖片有各種尺寸,從正方形到全景圖片可以填充容器的整個寬度。同位素插入後,ReLayout

我想知道如何在插入新圖像後重新插入圖像,因爲我不想在我的照片之間留下大的,醜陋的空白。

這裏是我的代碼不工作

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

感謝您的幫忙!

回答

0

試試這個代碼:

$container.append($(newElements)).isotope('insert', $(newElements));