Skip to content

Instantly share code, notes, and snippets.

@mrsweaters
Created August 23, 2012 16:00
Show Gist options
  • Save mrsweaters/3437985 to your computer and use it in GitHub Desktop.
Save mrsweaters/3437985 to your computer and use it in GitHub Desktop.
Backwards compatability
jquery_check : function () {
// define on() and off() for older jQuery
if (!$.isFunction($.fn.on)) {
$.fn.on = function(types, sel, fn) {
return this.delegate(sel, types, fn);
};
$.fn.off = function(types, sel, fn) {
return this.undelegate(sel, types, fn);
};
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment