How do I convert a jQuery event target to a wrapped set?
In my recent project I am using click event like so:
$(".nav-item").click(function(evt){
do something here...
})
Inside the event handler function, I want to look at the target's child objects using jQuery selectors. Sort of
$(event.target + " > .subitem").html()
Assuming .subitem was a child node with a class subtype.
This does not work. Any hints?
+1
a source to share
1 answer