Skip to content

Instantly share code, notes, and snippets.

@joelremix
Last active August 29, 2015 14:02
Show Gist options
  • Save joelremix/e03bce1f708583d73e98 to your computer and use it in GitHub Desktop.
Save joelremix/e03bce1f708583d73e98 to your computer and use it in GitHub Desktop.

Revisions

  1. joelremix revised this gist Jun 12, 2014. 2 changed files with 1 addition and 1 deletion.
    1 change: 0 additions & 1 deletion jQuery.nextStep.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    //http://stackoverflow.com/a/18444288/372567
    $.fn.nextStep = function(step) {
    elem = this.parent().children().eq(this.index() + step -1 -(this.index()%step));
    return elem.length ? elem : this.parent().children().last();
    1 change: 1 addition & 0 deletions source
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    http://stackoverflow.com/a/18444288/372567
  2. joelremix created this gist Jun 12, 2014.
    5 changes: 5 additions & 0 deletions jQuery.nextStep.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    //http://stackoverflow.com/a/18444288/372567
    $.fn.nextStep = function(step) {
    elem = this.parent().children().eq(this.index() + step -1 -(this.index()%step));
    return elem.length ? elem : this.parent().children().last();
    };