KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
<ul><li><div><div><span id="thisid"></span></div></div></li></ul> $('#thisid').parent('li'); that obviously doesn't work, but how do I grab the li element? I don't want to use: $('#this').parent().parent().parent(); I don't want to use it, because it can happen that there is just one div element, instead of two. In this case I would grab the ul element instead of the li element.
Tags (comma-separated)
Save Edits
Cancel