Re: [jQuery] Make jCarousel Loop?
Sweet, thanks Jan. Works perfectly. Great way to start my day :) Adam -- View this message in context: http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7576706 Sent from the jCarousel mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Make jCarousel Loop?
I've just updated jCarousel to 0.1.2. You can pass now the option "wrapPrev" which does exactly that. Jan agent2026 wrote: > > Using the built in wrap, setting viewable images to 1 and using no > animation the carousel is visually looping in the next direction back to > the beginning. This is good enough for me in that direction, but there > must be some way to modify the first image 'prev' link to scroll to the > last image. > > If I can set carousel.scroll([item]); in a callback function, then I > figure I should be able to set a 'disabled' prev button to call a similar > function like carousel.scroll([last]);. As the first line item is already > having it's prev state changed to disabled, I thought this could be a good > line to follow for changing the prev item value from null to last (I've > changed my css so disable is the same as enabled). > > Sounds good to me, but I can't figure out how to do it :). Hope someone > can help with this. > > Adam > -- View this message in context: http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7576454 Sent from the jCarousel mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Make jCarousel Loop?
Sry, hit the send-button too eatly. You also have to to replace the line priv.buttons(true, false); with priv.buttons(true, priv.o.wrap); Jan Jan Sorgalla wrote: > > Hi, > > try that (untested): > > Replace the line > > priv.scroll(priv.first - priv.o.itemScroll); > > with > > priv.scroll((priv.o.wrap && priv.first == 1) ? priv.size - > priv.o.itemVisible + 1 : priv.first - priv.o.itemScroll); > > Jan > -- View this message in context: http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7565852 Sent from the jCarousel mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Make jCarousel Loop?
Hi, try that (untested): Replace the line priv.scroll(priv.first - priv.o.itemScroll); with priv.scroll((priv.o.wrap && priv.first == 1) ? priv.size - priv.o.itemVisible + 1 : priv.first - priv.o.itemScroll); Jan agent2026 wrote: > > Using the built in wrap, setting viewable images to 1 and using no > animation the carousel is visually looping in the next direction back to > the beginning. This is good enough for me in that direction, but there > must be some way to modify the first image 'prev' link to scroll to the > last image. > > If I can set carousel.scroll([item]); in a callback function, then I > figure I should be able to set a 'disabled' prev button to call a similar > function like carousel.scroll([last]);. As the first line item is already > having it's prev state changed to disabled, I thought this could be a good > line to follow for changing the prev item value from null to last (I've > changed my css so disable is the same as enabled). > > Sounds good to me, but I can't figure out how to do it :). Hope someone > can help with this. > > Adam > -- View this message in context: http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7565628 Sent from the jCarousel mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Make jCarousel Loop?
Using the built in wrap, setting viewable images to 1 and using no animation the carousel is visually looping in the next direction back to the beginning. This is good enough for me in that direction, but there must be some way to modify the first image 'prev' link to scroll to the last image. If I can set carousel.scroll([item]); in a callback function, then I figure I should be able to set a 'disabled' prev button to call a similar function like carousel.scroll([last]);. As the first line item is already having it's prev state changed to disabled, I thought this could be a good line to follow for changing the prev item value from null to last (I've changed my css so disable is the same as enabled). Sounds good to me, but I can't figure out how to do it :). Hope someone can help with this. Adam -- View this message in context: http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7563217 Sent from the jCarousel mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/