I have the following Javascript code
function scrollOpenTimed() {
var openTimer = setTimeout(function(){ scrollOpen(); }, 3000);
}
function a() {
var _ouibounce = ouibounce(document.getElementById('modal'), {
aggressive: true,
timer: 0,
callback: function() {
console.log('ouibounce fired!');
// cancel the openTimer
}
});
}
At the moment I have scrollOpen being triggered after 3 seconds.
I want to cancel the timer and stop scrollOpen function being triggered When the callback function in function a() / ouibounce() function is triggered.
Any ideas how to do this appreciated.
Thanks