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?