由於某種原因,JQuery Isotope只能在一個圖像容器中工作。誰能告訴我爲什麼?同位素僅在一個圖像容器中工作
<div id="container"><div>
<img class="item" src="./download/file.php?id=77&t=1" alt="gh h gh gjgh h gjjh gk - 418635_486786424666755_551315440_n.jpg" width="200" height="126" />
</div><div>
<img class="item" src="./download/file.php?id=80&t=1" alt="gh h gh gjgh h gjjh gk - blog130812_fish.jpg" width="200" height="133" />
</div></div>
<div id="container"><div>
<img class="item" src="./download/file.php?id=90&t=1" alt="gh h gh gjgh h gjjh gk - blog130812_fish.jpg" title="gh h gh gjgh h gjjh gk - blog130812_fish.jpg" width="200" height="133" />
</div><div>
<img class="item" src="./download/file.php?id=92&t=1" alt="gh h gh gjgh h gjjh gk - 418635_486786424666755_551315440_n.jpg" title="gh h gh gjgh h gjjh gk - 418635_486786424666755_551315440_n.jpg" width="200" height="126" />
</div></div>
<script>
var $container = $('#container');
$container.isotope({
itemSelector: '.item',
animationEngine : 'jquery',
animationOptions: {
duration: 350,
easing: 'linear',
queue: false
},
masonry: {
columnWidth: 203
}
});
</script>
我現在在想這是因爲也許我應該使用一個獨特的容器ID ...是/否? –