Quantcast
Channel: User Alexis Abril - Stack Overflow
Viewing all articles
Browse latest Browse all 43

Answer by Alexis Abril for How to bubble custom jQuery event to window.document?

$
0
0

I think you're looking for calling $.event.trigger manually:

$.event.trigger('myCustomEvent', someDataObj, someDomElement, false);

The last parameter is used for the "onlyHandlers" flag, false in this case as we want to trigger the elements handlers and then trigger again on each parentNode. In this fashion you can bind "myCustomEvent" to anything in between the window and the node where this event originated.


Viewing all articles
Browse latest Browse all 43

Trending Articles