title: Masonary and JQuery reloading
body: <p>I am using Masonry from <a href="http://masonry.desandro.com" rel="nofollow">http://masonry.desandro.com</a> on a project where I am trying to create a timeline effect for my users. </p>
  
  <p>I wanted to auto refresh the page every so often (10 seconds for testing purposes) but ran into a problem. On the first load it calls the getStatus() function an the page loads perfectly. But after 10 seconds the data is reloaded and the masory is broken. </p>
  
  <p>I think I tried every combo on when to call and recall the library but nothing seems to work. Any ideas how I can get the masonry to work with reloaded content each time. basically rebuild itself correctly when the new data (which is HTML) is delivered to the page? I know I am doing this all wrong but here is what i have in my script block.</p>
  
  <pre><code>&lt;script&gt;
  container = document.querySelector('#timeline-list');
          msnry = new Masonry( container, {
              // options
              columnWidth: '.col-sm-6',
              itemSelector: '.col-sm-6'
          });
          function getStatus() {
              $.getJSON('/community/get_status', function(data) {
                  $('div#timeline-list').html(data.content);
                      msnry = new Masonry( container, {
                          // options
                          columnWidth: '.col-sm-6',
                          itemSelector: '.col-sm-6'
                      });
              });
  
  
              setTimeout("getStatus()",10000);
          }
  
          jQuery(window).load(function(){
              getStatus();
              if(jQuery(window).width() &lt;= 640 ){
              msnry.destroy();
          }
  
              // check on resize
              jQuery(window).resize(function(){
                  if(jQuery(this).width() &lt;= 640 )
                      msnry.destroy();
              });
  
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>The reload function returns all the col-sm-6 divs and data in HTML.</p>
  
  <p>I've tried .layout and .reloadedItems and neither of them seem to work (or exist for what it's telling me. Any ideas? Thanks!</p>