Daddy Warbox
Daddy Warbox

Reputation: 4608

Quick jQuery question: Stopping event propagation?

I have a set of elements that respond to mouseUp events, and inside of them are child elements that respond to mouseUp events as well (all via. jQuery). How do I make it so when a child's mouseUp event occurs from a user mouse click the child's parent's mouseUp event doesn't also occur in jQuery?

Upvotes: 10

Views: 8831

Answers (1)

Tyson
Tyson

Reputation: 6244

You want event.stopPropagation()

Upvotes: 19

Related Questions