views:

58

answers:

2

for example

<a href="http://stackoverflow.com" class="selected">stackoverflow</a>

my jquery is here

alert($('.selected').attr('href'));

but this don't work

How to get attribute from selected object?

+3  A: 

The anchor tag should have an href attribute, not src.

Marius
+2  A: 

You say scr in the anchor tag and src in the jquery expression. Also anchors have href not src attributes.

cletus