Capturing clicks even when stopPropagation has been called (ie by 3rd party code)?
- by josh
I want to detect any click that happens on a page (to close a custom context menu). I'm using jQuery and trying to do
$(document).click(function(){ ...close my context menu ... });
However, I'm using some code that calls evt.stopPropagation() in the click handlers for certain elements on the page, and those clicks aren't making it up to my top-level handler. Is there any way of capturing those clicks? Can be jQuery or not jQuery, as long as it works cross-browser.