Im using jcaroucel
I would like to execute some code when an image is selected.
I would like to highlight the image in some way to show it is selected - e.g put a border around it? - and then i want to set a hidden inputs value to be set as the src of the selected image.
Can someone help - thanks
I looked through the documentation and didn't see any sort of "select" callback. Depending on how you want an image to be "selected", you can use the classes generated by jCarousel. Something like this will "select" an image if it is clicked:
$("ul.jcarousel-list li").click(function() {
$(this).addClass("selected")
.siblings().removeClass("selected");
});