Skip to content

Instantly share code, notes, and snippets.

@calacitizen
Created January 18, 2014 18:26
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 calacitizen/8494257 to your computer and use it in GitHub Desktop.
Save calacitizen/8494257 to your computer and use it in GitHub Desktop.
Tiny jQuery Exist Plugin by Chris Goodchild
$.fn.exists = function(callback) {
var args = [].slice.call(arguments, 1);
if (this.length) {
callback.call(this, args);
}
return this;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment