I have a timer inside document.ready. Like this:
$( document ).ready(function() {
timer = window.setInterval(myAction, 3000);
});
Then I have a function called pauseTimer() like this:
function pauseTimer() {
timer.pause();
}
But.. why this is not working?