Here is a JavaScript code snippet that triggers different functions based on the number of clicks. For instance, clicking once triggers function1, while clicking twice triggers function2.
Now, how can I modify this code so that if I am in the stop_autoslide function for X seconds, I can automatically call the start_autoslide function?
<script>
var count = 0;
function function1(){
stop_autoslide();
count++;
}
function function2(){
start_autoslide();
count = 0;
}
function slideShowClicks(){
if(count == 0){
function1();
}else{
function2();
}
}
</script>