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 print std::string array with printf in c++?

c++ string printf std stdstring

I am trying to print std::string with printf and this my code. But it does not print the string I assigned.

PHP how to check whether postfix is on

php postfix-mta

Is it possible to check in PHP, whether postfix service is running or not? I am looking for platform independent solution (so I don't want to execute console commands within PHP code).

Overriding FOSUserBundle layout.html.twig when using a custom app path

symfony2 fosuserbundle

I've followed the instructions for overriding the default layout.html.twig, but although my paths seem correct, the replacement template seems to be ignored.