Hi,
Can someone help me do one of two things.
1) Make the cycle plugin highlight the relevant button.
- or -
2) Make the cycle plugin stop rotating once a button is clicked.
My problem is that the images cycle, then I click a button. The cycling resumes but the previously selected button stays highlighted. Either fix will be suitable. Perhaps fix 1 is preferable but I am easy really.
Here is what I have at the moment.
var $container = $('#slider .inner').cycle({
fx: 'scrollHorz',
speed: 300,
timeout: 4000
});
$container.children().each(function(i) {
// There are only 3 images, this is to stop a random 4th button being created.
if (i != 3) {
$('<input type="button" value="'+(i+1)+'" />')
// append it to button container
.appendTo(bc)
// bind click handler
.click(function() {
// cycle to the corresponding slide
$container.cycle(i);
$(".home_buttons input").removeClass('selected');
$(this).addClass('selected');
return false;
});
}
});