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. Quote Link to comment 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'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.