cant get stopPropagation to work
Hi,
I have a simple onclick function call for a div which looks like this:
-
onclick="showPanel(this)"
And the showPanel function header is as such:
-
function showPanel(el) {
}
I also have some children in the div which are links, and I want top stop the propagation. Unfortunately, when I put a breakpoint inside showPanel (using FF3), 'el' does not have any of the following properties: srcElement, target, stopPropagation. So I can't seem figure out if I should return of continue the function.
I even tried to wrap the inner links inside a div which had a similar onclick function whose purpose is only to call stopPropagation, but I got the same results as above (i.e. no stopPropagation method).
I thought about establishing the onclick function as such:
-
$('div').filter('.myPanel').click(function (event) { });
and checking the event target inside the function, but I load parts of the html through ajax, which means I will after run the code above after load, and that solution just doesnt seem that clean.
Anyone have any ideas on how I can manage this?
Thanks.