jquery skip list item
Posted
by steve
on Stack Overflow
See other posts from Stack Overflow
or by steve
Published on 2010-05-16T19:39:47Z
Indexed on
2010/05/16
19:40 UTC
Read the original article
Hit count: 261
Is there a way for a jQuery function to "skip" an li? Such as Having 3 list items, you click on the 1st one, it calls a next() function, and skips the 2nd li and goes to the 3rd.
Current code is here:
$('ul.gallery li').click(function() { $(window).scrollTo($(this).next('li'), 800, {easing:'easeOutCirc', axis:'x', offset:-50 } ); });
I want it to skip the immediate li and go to the one after that.
© Stack Overflow or respective owner