Closed skamril closed 9 years ago
This makes .next()
method move to 1st element when reaching the end. I don't know if this is desirable.
But even if it would, you are ignoring .prev()
method, which won't have similar logic.
You also introduced a bug. When there is no activeItem defined, it'll try to add 1 to undefined value. That's why there is currently the rel.activeItem == null
check.
We can have a discussion whether prev/next methods should loop in another issue, but this PR is not gonna get merged. Sorry for the delay btw :neutral_face:
I think it would be interesting to add an optional parameter to .next()
and .prev()
methods for allowing loop.
Fix problem with next() when last item is activated.