I've got a simple function that loops itself. I'd like to kill kill it and then re-execute it based on user action. Not sure what the best way to do it is.
Here's what I've got:
function loopor(){
$slider.next();
setTimeout(loopor, 3000);
}
And here's what I need to do:
$('#thing').click(function(event){
event.preventDefault();
var thing = $(this);
/* help here */
magicKillLooporFunction();
/* end help*/
thing.animate({
height: '100%'
}, function({
loopor();
});
});