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

Python __call__ special method practical example -

arrays - jQuery - Retrieve values from HTML elements and return their sum -