Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/03/2019 in Posts

  1. You're going to want to make use of setTimeout. The syntax is as follows: setTimeout(function() { // Execute this code after the timeout of 1000ms }, 1000); Keep in mind that this function is asynchronous, which means $(document).ready(function(){ setTimeout(function() { intro('#hello', '#world'); }, 1000); setTimeout(function() { intro('#hi', '#all'); }, 1000); setTimeout(function() { intro('#hola', '#amigos'); }, 1000); }); Will execute all into functions after 1 second. This could be a solution: $(document).ready(function(){ setTimeout(function() { intro('#hello', '#world'); }, 1000); setTimeout(function() { intro('#hi', '#all'); }, 2000); setTimeout(function() { intro('#hola', '#amigos'); }, 3000); }); However that will quickly fail if the execution of the next function has to be 1 second after the previous function has finished (assuming there might be some delays/user input/processing inside the intro function) Hopefully that's enough information to get you on the right track to figuring it out
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.