<ul id ="myList">
<li><a href="www.example.com">link</a></li>
</ul>
如何使用jQuery获取ul(myList)的id?单击a链接时会触发My j-script事件.我试过:
$(this).parent().attr('id');
But it gets the id of the li, I need to go one higher, and I cant attach the click to the li either.