The difficulty here is that if user hovers over a bullet (or side tabs) then the respective slide should be displayed and once the user hovers-out of the bullet then the slide-show should resume.
After searching for long on Internet, I decided to write one jQuery plugin for this slideshow by myself.
While working on this I learnt the difference between setTimeout and setInterval. I also used the clearInterval to interrupt the time interval ion javascript.
Whenever we have to use recursive functions like this:
function recrFunc(){
.
.
setTimeout('recrFunc();', 10000);
.
.
}
...then it's better to use setInterval() function something like this:
timeoutid = setInterval('recrFunc();', 10000);
function recrFunc(){
...
}
... the use of setInterval function is that this time can be cleared anytime by using clearInterval() function like this:
clearInterval(timeoutid);
So, crux of the story is that if you have to call a function recursively after a specific time interval then use setInterval instead of setTimeout and if you have to call a function only once after pausing for a specific time period then use setTimeout
