I use jquery click event for a div and the div area has an input element. Because the input element is in the div, when I click input, the click function works, but I don’t want this action.
I looked at the selector page in Jquery’s website, but I couldn’t find this selector. How can I do this?
I use jquery click event for a div and the div area has an
Share
Use the
nodeNameproperty of the originating element to see where the event originated:If you want a more complex query (e.g. using jQuery pseudoselectors), you can use
is: