0
I have this object, it works well but I wanted to add a property to stop, this is not working:
JS:
var kissesAni = {
    init: function () {
        kissesAni.callAni();
    },
    callAni: function(){
        window.setInterval(function(){
            kissesAni.makeImgAni();
        }, 30);
    },
    stop: function() {
        window.clearInterval(kissesAni.callFontFlakes);
    },
    makeImgAni: function(){
        ...
    }
};
kissesAni.init();
    window.setTimeout(function() {
        console.log('heya');
        kissesAni.stop();
    }, 5000);
I mean, does the console.log('heya') but the animation doesn’t stop.
It worked, thank you
– Miguel