Skip to content

Instantly share code, notes, and snippets.

@skylying
Created November 26, 2016 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skylying/a837eb517fcfae57f4f1877dbcd52602 to your computer and use it in GitHub Desktop.
Save skylying/a837eb517fcfae57f4f1877dbcd52602 to your computer and use it in GitHub Desktop.
Manipulate jQuery fn
extendJqueryEvent: function() {
var oldTrigger = $.fn.trigger;
$.fn.trigger = function() {
var ret = oldTrigger.apply(this.arguments);
// Our own code
console.log("Whatever we want to do")
return ret;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment