how to get attribute from any selected object in jquery
<p>for example</p>

<pre><code>&lt;a href="http://stackoverflow.com" class="selected"&gt;stackoverflow&lt;/a&gt;
</code></pre>

<p>my jquery is here</p>

<pre><code>alert($('.selected').attr('href'));
</code></pre>

<p>but this don't work</p>

<p>How to get attribute from selected object?</p>
