使用同位素(http://isotope.metafizzy.co/index.html),有没有办法指定即使在对项目进行随机播放时,div
与班级featured
始终位于最左上角它的容器的位置?
HTML
<div class="item w2 h2 featured"></div>
<div class="item w1 h1></div>
<div class="item w3 h1></div>
<div class="item w2 h1></div>
JS
var $container = $('$container');
var isotope = function () {
$container.isotope({
resizable: false,
itemSelector: '.item',
masonry: {
columnWidth: colWidth(),
gutterWidth: 20
}
});
};
isotope();
$window.smartresize( isotope );
$('#shuffle').click(function(){
$container.isotope('shuffle');
return false;
});