I have two jfunctions in a page,
function function1(){
//codes
setTimeout("function1()",5000);
}
and
function function2(){
//codes
setTimeout("function2()",5000);
}
functions are called when
<div class="navPanel">
<div onclick="function1();">Link1</div>
<div onclick="function2();">Link2</div>
</div>
I need to stop working of function1 when function2 is called and viceversa….what to do…..??? help…
Set the timeouts to a variable which then allows you to use the clearTimeout function.