Created
August 4, 2015 00:51
-
-
Save Romiko/faad9f39d14f770b4450 to your computer and use it in GitHub Desktop.
Javascript intercept events on an element using jquery _data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var element = $('#design-tile-2')[0]; | |
var clicks = $._data(element).events.click; | |
clicks.forEach(function (click) { | |
var handler = click.handler; | |
click.handler = function () { | |
debugger; | |
handler.apply(this, arguments); | |
}; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment