I’m hiding a li and after hiding it there is a gap left in the html and i want to reload masonry and re-arrange
the contents. I tried .masonry( ‘reload’ ) but i didn’t work . Any help
Fiddle
http://jsfiddle.net/emtBX/1/
JS
$(document).ready(function(){
$('#container').masonry({
// options
itemSelector : '.item',
columnWidth : 240,
isAnimated: true,
animationOptions: {
duration: 750,
easing: 'linear',
queue: false
}
});
$('#butn1').click(function() {
$('#container ul li').eq(2).hide();
$('#container').masonry('reload');
});
});
You can hide the li-element and remove the .item class to reorder the elements, http://jsfiddle.net/emtBX/11/