title: How to animate divs when they move to fill empty space left by other divs that fade out
body: <p>I have a set of divs, each corresponds to a set of categories. When I click on a filter, this will change the classes of the divs and make them vissible or hidden depending on those categories. I control how the divs fade in/out and they do it slow and nicely but everytime the divs disappear the ones that are left unchanged move abruptly to fill the empty space left by the ones that were hidden.</p>
  
  <p>How can I smooth the movement of the divs that weren't hidden after the other ones disappear and left an empty space?</p>
  
  <pre><code> //Before this goes a long function that decides wich divs will get their class changed
   $('#work-container &gt; div[class*=visible]').fadeIn('slow','swing');
   $('#work-container &gt; div[class*=hidden]').fadeOut('slow','swing');
  </code></pre>
  
  <p>Edit: <a href="http://jsfiddle.net/Ccswn/3/" rel="noreferrer">http://jsfiddle.net/Ccswn/3/</a> Fiddle of the thing</p>