Skip to content

Instantly share code, notes, and snippets.

@joshuabaker
Created April 25, 2011 15:05
Show Gist options
  • Save joshuabaker/940635 to your computer and use it in GitHub Desktop.
Save joshuabaker/940635 to your computer and use it in GitHub Desktop.
Invert filter method for jQuery
$.fn.invert = function () { return this.end().not(this); };
@joshuabaker
Copy link
Author

Inverts the selected elements based on a previous filter/not/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment