Skip to content

Instantly share code, notes, and snippets.

@uniquelau
Created September 16, 2011 14:57
Show Gist options
  • Save uniquelau/1222294 to your computer and use it in GitHub Desktop.
Save uniquelau/1222294 to your computer and use it in GitHub Desktop.
jQuery - Even stuff
// jQuery Library
(function ($) {
$.fn.even = function () {
var jQ = $();
jQ.context = this.context;
jQ.selector = this.selector;
for (var i = j = 0, l = this.length; i < l; i += 2, j++)
jQ[j] = this[i];
return jQ;
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment