i have a click event for $(‘#blah div’). div has text inside of it (not inside a div, span, p, etc) and has a textarea in it. The textarea is triggering the event as well, how do i make it only trigger when i click the text and ignore the textarea?
Share
Stop the bubble, like this:
This tells it to cancel the event bubble when the click originated in the
<textarea>. Normally the click happens on the<textarea>and continues to bubble to the parents and fire their click handlers…this prevents that.