XPath Selectors : Finding any link that is a tag, href tag (mailing/pdf/link) link
<p>Following is the jQuery &amp; CSS code. Where I want to add the class to all the a tags but I am not getting the result. Is there any way to get all the class through jQuery code.</p>

<p>jQuery Code :</p>

<pre><code>$('a[@href^="mailto:"]').addClass('mailClass');
$('a[@href$=".pdf"]').addClass('pdfClass');
$('a[@href*="xyze.com"]').addClass('mySiteClass');
</code></pre>

<p>CSS Code :</p>

<pre><code>a.mailClass{
    color: #ff0000;
    border:1px solid red;
    text-decoration:none;
}
a.pdfClass { color: #000090; }
a.mySiteClass {
    text-decoration: none;
    border-bottom: 1px dotted #00ff00;
}
</code></pre>

<p>body Code :</p>

<pre><code>&lt;div&gt;
    &lt;a href="mailto:xyz@xyz.com"&gt;Test&lt;/a&gt;&lt;/br/&gt;
    &lt;a href="http://www.xyz.com"&gt;Test&lt;/a&gt;
&lt;/div&gt;
</code></pre>
