I'm trying to stop/clear the interval but i'm getting an error.
code below:
   function play(){
      function sequencePlayMode() {
         var arg1;//some arguments
         var arg2;//some arguments
         changeBG(arg1,arg2);//here is function that changes the background
      }
     var time = 5000;
     var timer = setInterval(sequencePlayMode, time);//this starts the interval and animation
    }
    function stop(){
       var stopPlay  = clearInterval(sequencePlayMode);//here i'm getting error "sequencePlayMode is not defined"
    }
    $("#startAnimation").click(function(){
            play();
    });
    $("#stopAnimation").click(function(){
           stop();   
    });
Can someone help me with this please?
 
    