Element does not resize although it should

I'm using the isotope plugin for pinterest like boxes, the only problem: if anything in the box changes (and changes the height of the box), then they overlap. To avoid that, I'm trying this:

$('#container').isotope({
  // options
  itemSelector : '.box'
});

$(".special").click(function() {
    $(this).append("I'm a <strong>special</strong> box!");
    $('#container').isotope({'reLayout'});
});

.. but it doesn't seem to work.

Please check out an example here: http://jsfiddle.net/eELmb/

Answers


Try using relayout like this:

$('#container').isotope('reLayout');

http://isotope.metafizzy.co/docs/methods.html#relayout


Need Your Help

how to set session variable for click on image in gallery view and load to a new page

php jquery ajax session-variables

when click a image form the gallery of image, i need load to another page along with setting the $_SESSION['IssueID'] something like this, i know by send it through URL (get method) but i don't wan...

C# lock(mylocker) not work

c# multithreading visual-studio-2010 locking

I have many web service call (asychronous), in callback, I will plot result to Excel.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.