var myTimer = setInterval(function(){
var eleID = '';
var delayTimer = '';
$('#hp-fcas li').each(function(i) {
eleID = $(this).attr('id');
delayedTrigger( $('#'+eleID + ' a'), 7000*i);
});
function delayedTrigger(elem, delay){
setTimeout(function(){
$(elem).trigger('click');
}, delay );
}
}, 21000);
$(".play").click(function(){
clearTimeout();
clearInterval(myTimer);
});
The first interval is 21 seconds, of the first instance.
the 2nd interval is 3 7-second instances (what I want).
I'm trying to clear all of the above when I click .play.
Any help?