I'm currently building a content slideshow and you can find it at
Below is the javascript code:
jQuery(document).ready(function($) {
setInterval(function() {
moveRight();
}, 8000);
var slideCount = $('#slider-isp ul li').length;
var slideWidth = $('#slider-isp ul li').width();
var slideHeight = $('#slider-isp ul li').height();
var sliderUlWidth = slideCount * slideWidth;
$('#slider-isp').css({
width: slideWidth,
height: slideHeight
});
$('#slider-isp ul').css({
width: sliderUlWidth,
marginLeft: -slideWidth
});
$('#slider-isp ul li:last-child').prependTo('#slider-isp ul');
function moveLeft() {
$('#slider-isp ul').animate({
left: +slideWidth
}, 1000, function() {
$('#slider-isp ul li:last-child').prependTo('#slider-isp ul');
$('#slider-isp ul').css('left', '');
});
};
function moveRight() {
$('#slider-isp ul').animate({
left: -slideWidth
}, 1000, function() {
$('#slider-isp ul li:first-child').appendTo('#slider-isp ul');
$('#slider-isp ul').css('left', '');
});
};
$('a.control_prev').click(function() {
moveLeft();
});
$('a.control_next').click(function() {
moveRight();
});
});
I've been researching how to reset the auto-scroll timer after a click on an image slider, similar to what's discussed in this post:
How do I get my image slider to reset its auto-scroll timer after a click?
I'd like to implement something similar without disrupting the existing code. Any help would be appreciated.
Please assist.