Skip to content

Instantly share code, notes, and snippets.

@badp
Created October 16, 2010 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badp/629941 to your computer and use it in GitHub Desktop.
Save badp/629941 to your computer and use it in GitHub Desktop.
$.fn.each2 = function(callback)
{
for ( var i = 0; i < this.length; ++i ) {
jQueryObj = this.eq(i)
if( callback.call( jQueryObj, i, jQueryObj) === false){
break;
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment