Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to make jQuery cycle not loop when reaching the end or the beginning?

I realize that the plugin is called CYCLE because it cycles throgh the element of the list. But what I like most about it is its flexibility, so I was wondering if there is any way to make the plugin not cycle. So if you try to go to the previous slide when on the first one, or to the next slide when on the last one, it just stops.

I've been reading through the options and the code but cant find the solution

like image 877
agente_secreto Avatar asked Aug 04 '11 15:08

agente_secreto


1 Answers

http://jquery.malsup.com/cycle/options.html

Check out the nowrap property. (See http://jquery.malsup.com/cycle/nowrap2.html) Set it to nowrap: 1 and your show will stop after each slide has been played 1 time. This is clearly the option you'd need.

like image 172
Chris Cashwell Avatar answered Sep 28 '22 04:09

Chris Cashwell