Pass variable and DOM element to jquery each
<p>I've been struggling with this for a while, and have tried many searches, but haven't found the right solution, nor words for the issue I have.
I wish to traverse the <code>&lt;tr&gt;</code>'s in <code>&lt;table id="Listeners"&gt;</code> with jQuery, and set the rows to either Even or Odd class.</p>

<p>The  is yet saved in a variable and passed to the function, as follows:</p>

<pre><code>&lt;table id="Listeners"&gt;
 &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
 &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>And my jQuery:</p>

<pre><code>var Element = $("#Listeners");
$(Element+" tr").each(function(index) {
 if (index%2 == 0) {
  $(this).addClass("Even");
 }
});
</code></pre>

<p>But that doesn't work, any thoughts on how to solve this?</p>
