jQuery Isotope masonry layout animation failing :(
I am trying to get jQuery Isotope's masonry layout to work on this test site: http://make.truliablog.com/test-filters
It appears to be sorting them properly, but the animation when you resize the window and the blocks adjust are not working开发者_开发知识库. How can I fix this problem?
Here is the associated jQuery code.
<script>
jQuery(document).ready(function(){
jQuery('#container').isotope({
masonry : {
columnWidth : 50
}
});
// Filter buttons
jQuery('#filters a').click(function(){
var selector = jQuery(this).attr('data-filter');
jQuery('#container').isotope({ filter: selector });
return false;
});
});
</script>
It seems Isotope has the default 'animationEngine' as 'css'. The shortest way would be to set 'animationEngine' as 'jquery' (assuming you are using jQuery).
jQuery('#filters a').click(function(){
var selector = jQuery(this).attr('data-filter');
jQuery('#container').isotope({
filter: selector,
animationEngine : "jquery"
});
return false;
});
精彩评论