use setTimeout clearTimeout combo. var timer; function func() { $("a.tm_link").fadeOut("slow").fadeIn("slow"); setTimeout("func()", 5*1000) }
onclick clearTimeout(timer);
use setTimeout clearTimeout combo. var timer; function func() { $("a.tm_link").fadeOut("slow").fadeIn("slow"); setTimeout("func()", 5*1000) }
onclick clearTimeout(timer);