Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in /home/forge/masseltech.com/wp-includes/plugin.php on line 600

Run JavaScript function every n seconds


//tell javascript to run a function in 1 second
setTimeout ("myFunction()", 1000 );

function myFunction(){
//do stuff

//once the function is finished, queue this function up to run again in 1 second
setTimeout ( "myFunction()", 1000 );
}


Leave a Reply