问题
My url is leftsideart (dot) co (dot) nz
I am using the following isotope setup:
jQuery('#post-area').isotope({
animationOptions: {
duration: 750,
easing: 'linear',
queue: false
},
getSortData : {
number : function( $elem ) {
return parseInt( $elem.find('.order').text(), 10 );
}
},
sortBy : 'number',
sortAscending : true,
animationEngine : 'jquery'
});
var jQuerycontainer = jQuery('#post-area');
jQuerycontainer.imagesLoaded( function() {
jQuerycontainer.isotope();
});
but my divs are not ordering correctly. Isotope is definitely affecting the order as I have tried echoing random numbers in my wordpress loop as opposed to incrementing numbers and the divs shuffle accordingly.
Also, just to be sure, when I change the change 'sortAscending' to false then the general order of the divs is reversed.
Does Isotope offer only a general ordering as opposed to an exact ordering?
回答1:
for an similar kind of problem, this worked for me
layoutMode: 'cellsByColumn',
cellsByColumn: {
columnWidth: 240,
rowHeight: 360
}
docs are here http://isotope.metafizzy.co/v1/demos/layout-modes.html
来源:https://stackoverflow.com/questions/15137293/jquery-isotope-ordering-not-ordering-divs-accurately