how to stop the setinterval() in javascript
- by vakas
i want to stop the setinterval at a specific condtion
i am using this
function Blink(targetId)
{
if($(targetId))
{
if($(targetId).style.color=='red')
$(targetId).style.color='black';
else
$(targetId).style.color='red';
}
else
//STOP THE FUNCTION
}
setInterval(Blink,1000,'timer_'+sourceId);