Get elements in jQuery where "x" attribute = "y"
<p>How can I change the attribute of an element, depending on another attribute?</p>

<p>For example, I have 2 <code>&lt;a&gt;</code> elements. They both have the class <code>myClass</code>. One of the elements has <code>rel="1"</code> and the other has <code>rel="2"</code>. I wish to only change the <code>z-index</code> on the one which has <code>rel=1</code>. How do I do this?</p>

<p>I've tried:</p>

<pre><code>$(".myClass[rel='1']").css("z-index", 10);
</code></pre>

<p>But it doesn't work. Cheers.</p>
