Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clear interval js


// interval id initialization 
var myIntervalID;

// setInterval execution
myIntervalID = setInterval(function() { 
  
   // your main code for interval execution (this is just an example code)
   $("body").css("font-size", '75px').addClass("interval-deletion-signal");
  
   // setInterval deletion 
   if($("body").hasClass("interval-deletion-signal")){
      console.log('please make it stop the interval');
      clearInterval(myIntervalID);
   }   
  
}, 1);
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #clear #interval #js
ADD COMMENT
Topic
Name
3+2 =