godsent Posted February 27, 2010 Share Posted February 27, 2010 I would like to grab value of "uid" of this code: <a href="# class="hop" uid="1"><code>1</code></a> I am using this code: var clicked = $(this).parents('a[uid]:eq(0)').attr('uid'); alert(clicked) Still getting 'undefined', can't figure out whats wrong. The worsed thing that almost the same code worked before for "li" <li ID="123"><a class="hop highlight" href="#">text</a></li> $(this).parents('li[iD]:eq(0)').attr('ID'); I can't figure out the problem, if you know please help. Link to comment https://forums.phpfreaks.com/topic/193547-grab-value-jquery/ Share on other sites More sharing options...
godsent Posted February 27, 2010 Author Share Posted February 27, 2010 solved myself, simple as that var clicked = $(this).attr('uid'); Link to comment https://forums.phpfreaks.com/topic/193547-grab-value-jquery/#findComment-1018955 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.