So I have a parent that defines a onmouseup event that hide/display a table. The problem is that I want the ability to have nested expandable/collapsible tables but when I click one that is nested it will fire the event for the parent and collapse everything. I can do some niffy stuffy in javascript like assume that the nested event will fire first and then cancel the parent event but that seems kind of hacky. Is there a way to declare from a child element that no parent elements should fire for this event?
Share
I don’t think you can declare that kind of thing on an element
but you could, as you implied, try inside the handler of the child:
where e is the event ? or return false; should have the same effect, but I seem to remember having an issue (perhaps IE where it didn’t work, but that could just be another factor I was missing)