Skip to content

Instantly share code, notes, and snippets.

@joelremix
Created June 11, 2014 01:32
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 joelremix/a7fc6c46851754453796 to your computer and use it in GitHub Desktop.
Save joelremix/a7fc6c46851754453796 to your computer and use it in GitHub Desktop.
jQuery: nextFour()
// http://stackoverflow.com/a/18444121/372567
$.fn.nextFour = function (arguments){
return $(this).parent().children().eq(idx + 4-(idx%4)-1); // -1 to correct zero-based index
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment