javascript - SetTimeout how to do it? -


i want make code run after 20 seconds settimeout:

<script type="text/javascript">    soundcloud.addeventlistener('onplayerready', function(player, data) {      player.api_play();    }); </script> 

the code works correctly alone don't know how delay it. how can it?

thanks

settimeout(function() {     soundcloud.addeventlistener('onplayerready', function(player, data) {      player.api_play();    });  }, 20000); 

Comments

Popular posts from this blog

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -