Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (37 sloc) 1.708 kB
<!doctype html>
<p>
Just drag the link onto your bookmarks bar.
<p>
Click it on any page to see a trace of jQuery events in the console.
<p>
Remember that jQuery must be loaded onto the page you are viewing,
or it won't work.
<p>
Trace all jQuery events with this bookmarklet
<br />
<a href="javascript:(function(){jQuery('*').each(function(ei,ae){if(jQuery(ae).data('events')!==undefined){var $ae=jQuery(ae);jQuery.each($ae.data('events'),function(i,e){jQuery.each(e,function(j,h){var k=h.handler;h.handler=function(v){console.log('[jQE]',i,ae,{handler:k});return k(e);}});});}});})();">jQuery trace</a> &lt;- Drag this to your bookmarks bar
<!--
<p><button id="test">Test</button>
-->
<p>
<a href="http://github.com/izb/jQuery-event-tracer">See the code on github.com</a>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('#test').click(function() {
window.alert("This button serves as a simple test for the code on this page.");
});
jQuery('*').each(function(ei,ae){if(jQuery(ae).data('events')!==undefined){
var $ae=jQuery(ae);
jQuery.each($ae.data('events'),function(i,e){
jQuery.each(e,function(j,h){
var k=h.handler;
h.handler=function(v){console.log('[jQE]',i,ae,{handler:k});return k(e);}
});
});
}});
});
</script>
<!--
jQuery('*').each(function(ei,ae){if(jQuery(ae).data('events')!==undefined){var $ae=jQuery(ae);jQuery.each($ae.data('events'),function(i,e){jQuery.each(e,function(j,h){var k=h.handler;h.handler=function(v){console.log('[jQE]',i,ae,{handler:k});return k(e);}});});}});
-->
Jump to Line
Something went wrong with that request. Please try again.