Add class on the basis of rel value of anchor tag
<p>I have a li thatis as follows:-</p>

<pre><code>&lt;?php $i=0; foreach($bannerCollection as $banner): $i++; ?&gt;
 &lt;li&gt;&lt;a href="#" class="pagination" rel="tab&lt;?php echo $i;?&gt;"&gt;&lt;?php echo $i;?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endforeach; ?&gt;
</code></pre>

<p>This php code generate following Html code:-</p>

<pre><code>&lt;div id="pettabs" class="indentmenu"&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href="#" class="pagination" rel="tab1"&gt;1&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#" class="pagination" rel="tab2"&gt;2&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>Now I wanted to add one more class named "selected" to anchor on the basis of rel value.
For that I use </p>

<pre><code>jQuery('a.pagination').removeClass('selected').filter('a.pagination[rel=idvalue]').addClass('selected');
</code></pre>

<p>But it doesn't work. Please Help me.</p>
