Jquery JCarousel, itemLastInCallback how to change out the controls
Posted
by TJ Sherrill
on Stack Overflow
See other posts from Stack Overflow
or by TJ Sherrill
Published on 2010-03-13T00:02:26Z
Indexed on
2010/03/13
0:07 UTC
Read the original article
Hit count: 487
I am new to js and Jquery other than plug and play scripts and plugins. I have Jcarousel running great on a Ruby on Rails site and I need to use the itemLastInCallback method to change out the next and prev buttons. Basically if the end user clicks through to the last item in a carousel, the next button would become a link to the next carousel.
<%= link_to (image_tag 'scroll_right.png'), @next_group %> is the code I need to render in the end. So something like:
if this is not the last item in the carousel button is normal jcarousel next button else <%= link_to (image_tag 'scroll_right.png'), @next_group %> end
is there a best way to do this? am I on the right track?
© Stack Overflow or respective owner