0

How do I stop function below that starts when page is loaded? I want to stop it by clicking "Double_State_Button1".

EVENTSTART
Name:PageLoaded
Source:^((?!header|footer).)*$
SCRIPTSTART
  var Double_State_Button1 = presenter.playerController.getModule('Double_State_Button1');
    
  setInterval(function () {
    $('#Double_State_Button1').animate({ opacity: 0.4}, 1500);
    $('#Double_State_Button1').animate({ opacity: 1}, 1500);
  }, 1000);
SCRIPTEND
EVENTEND

Code is written in mauthor platform

biberman
  • 5,606
  • 4
  • 11
  • 35
  • Does this answer your question? [Stop setInterval call in JavaScript](https://stackoverflow.com/questions/109086/stop-setinterval-call-in-javascript) – biberman Nov 28 '22 at 12:29

0 Answers0