jquery skip list item -


What is a "left" way for a jQuery function? As if there are 3 list items, you first click on 1, it calls a next () function, and the second leaves Le and goes to the third.

Click the current code here:

$ ('ul.gallery li') (function () {$ (window) .scrollTo ($ (this) .next (' Li '), 800, {easing:' easeOutCirc ', axis:' x ', offset: -50});});

I want him to leave immediately and then go to one after another.

The easiest way is to simply call again, such as:

  $ ('Ul.gallery li'). Click (function () ($ (window) .scrollTo ($ (this) .next ('li'). Next ('li'), 800, {easy: 'rest octric', axis: 'x', offset : -50});});  
  • If you wanted it to be a special class like:

      

    You can use it instead,:

      $ ( 'Ul.gallery li'). (Function () {$ (window) .scrollTo ($ (this) .nextAll ('li.selectMe: first'), 800, {easy: 'resting octric', smoke Minister: 'x', offset: -50});});  

  • Comments