Created
August 6, 2013 07:30
-
-
Save lutzissler/6162794 to your computer and use it in GitHub Desktop.
Filter() and find() combined.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://forum.jquery.com/topic/jquery-jquery-way-for-filtering-self-all-children | |
$.fn.findAndSelf = function(selector) { | |
return this.find(selector).andSelf().filter(selector); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment