What is the timed out function in jquery ?
setTimeout("searchClusterAction(action)",3000);
function searchClusterAction(action)
{
var url = action
$(location).attr('href',url);
}
on using timedout I’m getting error on line2
var action = "/search/perform/1584/xyz/["1","2","3","4,5,6"]/json
setTimeout('searchClusterAction('+action+')',3000);
The
setTimeout()function allows JavaScript to make a note to run the given function X milliseconds in the future. (By the way, you should pass functions, not strings tosetTimeout(), no matter what w3Schools says)One caveat: Don’t call the function in the
setTimeout()call like so:as it will run
foo()and then pass the result offootosetTimeout(). Simply:Using setTimeout() for large values