JSFiddle - React, Tailwind, and code Playground
HTML
<p>Click me</p>
<div>Click me</div>
JavaScript
(function() {
// Store a reference to the existing bind method
var _on = jQuery.fn.on;
// Define a new implementation
jQuery.fn.on = function() {
// Do your logging, etc.
console.log("on called with " + arguments.length + " arguments");
// Don't forget to do the actual bind!
return _on.apply(this, arguments);
};
}());
$('p').on('click', function() {
//
});
$('div').bind('click', function() {
//
});