am using below jquery for change image in every 1 second
window.setInterval(function(){
imagechanger();
}, 5000);
as automatic changer its working fine. now i need to add next button. I call the same imagechanger() function on the next button click. That is also working fine
$('body').on('click','#next',function(){
imagechanger();
});
But suppose after calling the first change and waiting 4 seconds then i press the next button, when i click the button image is changing but the very next second another change call also triggered.
So how can i reset the time ??