// Simulating click after 3 seconds setTimeout(function(){ document.getElementById('fooLinkID').click(); }, 3 * 1000);