Created
October 11, 2012 04:45
-
-
Save yeco/3870222 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (function ($) { | |
| $.fn.between = function (elm0, elm1) { | |
| var index0 = $(this).index(elm0); | |
| var index1 = $(this).index(elm1); | |
| if (index0 <= index1) | |
| return this.slice(index0, index1 + 1); | |
| else | |
| return this.slice(index1, index0 + 1); | |
| } | |
| })(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment