Skip to content

Instantly share code, notes, and snippets.

@odiak
Created September 20, 2011 13:34
Show Gist options
  • Save odiak/1229072 to your computer and use it in GitHub Desktop.
Save odiak/1229072 to your computer and use it in GitHub Desktop.
!function () {
if (typeof jQuery === "undefined") { return; }
var $ = jQuery;
Object.prototype.$ =
Object.prototype.jQuery = function () {
return $(this.valueOf());
};
String.prototype.$ =
String.prototype.jQuery = function () {
return $(this.valueOf());
};
Function.prototype.$ =
Function.prototype.jQuery = function () {
return $(this);
};
Array.prototype.$ =
Array.prototype.jQuery = function () {
return $.apply(null, this.valueOf());
};
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment