title: JavaScript Isotope: Cannot read property 'each' of undefined
body: <p>I receive the following error when Using <strong><em>JavaScript Isotope</em></strong>.</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'each' of undefined
  </code></pre>
  
  <p>Tracing to the following line of code:</p>
  
  <pre><code>isotope.$filteredAtoms.each(function (i, elem)
  </code></pre>
  
  <p>And, if necessary for trouble shooting - the surrounding code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var isotope = $('.filter-container').data('isotope');
  function addEvenClasses()
  {
      // add even classes to every other visible item, in current order
      isotope.$filteredAtoms.each(function (i, elem)
      {
          $(elem)[(i%2 ? 'addClass' : 'removeClass')]('even');
      });
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am sure the fix is simple, I'm just not seeing it. Also, I am new to using Isotope :]</p>