Friday, 11 May 2012

How to stop click events firing on child divs

If you have multiple divs stacked on top of each other, and all divs are selectable (ui-selectable) you can stop the click events bubbling down to the lower level by adding event.stopPropagation() to the click event of the top most div. eg:

No comments:

Post a Comment