Created
October 28, 2008 14:27
-
-
Save kangax/20391 to your computer and use it in GitHub Desktop.
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
;jQuery.fn.extend({ | |
// Andrea Giammarchi - Mit Style Licence - V0.2 | |
If: (jQuery.fn.ElseIf = function(fn){ | |
var __If__ = this.__If__ || this, | |
$ = __If__.filter(fn); | |
$.__If__ = __If__.filter(function(){return !~$.index(this)}); | |
return $; | |
}), | |
Else:function(){ | |
return this.__If__; | |
}, | |
Do:jQuery.fn.each | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment