Finding nth div of a certain class with .eq
<p>I have the following HTML</p>

<pre><code>&lt;div id="MyDiv"&gt;

  &lt;div class="MyClass"&gt;test1&lt;/div&gt;
  &lt;div class="MyClass"&gt;test2&lt;/div&gt;
  &lt;div class="MyClass"&gt;test3&lt;/div&gt;
  &lt;div class="MyClass"&gt;test4&lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>I'm trying to use the jquery eq function and so far I have this:</p>

<pre><code>function(TheIndex) {
  alert( ('.MyClass').eq(TheIndex).html() );
};
</code></pre>

<p>I'm getting this error in Chrome</p>

<p><strong>Uncaught TypeError: Object .MyClass has no method 'eq'</strong></p>

<p>What am I doing wrong?</p>

<p>Thanks for your suggestions.</p>
