I've got an element which resides inside a div. I'd like to get the div by the child's ID, is this possible? if so how?
Thank you!
Try this:
$("#id").parent()
My first suggestion #id:parent doesn’t work as :parent selects all nodes that are parent of other nodes (including text nodes).
#id:parent
:parent
2.1m questions
2.1m answers
60 comments
57.0k users