JQuery Bind Popping My Bubble
Hello, I looked in the documentation but couldn't find an answer, so
figured I'd post.
Consider the following scenario.
function some_function() { ... }
function attach_event(object, event, method)
{
if (object.addEventListener) object.addEventListener(event, method,
false);
else if (object.attachEvent) object.attachEvent('on' + event,
method);
}
attach_event(document, 'click', some_function);
I'm basically attaching a function to the document object that fires
whenever a click event bubbles up, and calls some_function(). I want
it to execute whenever someone clicks something on the page. If I
attach other events to object click events on the page, this still
works.
Another developer implemented JQuery, and bound some functions to an
anchor link. For some reason, my some_function() no longer fires.
The only solution I found was to directly bind some_function() using
JQuery instead of my generic document catch-all.
I don't know enough about JQuery to understand why this is happening
-- do you? Is there any way to get JQuery to allow my document object
to still receive the click event?
Thanks,
Dave