Reputation: 1029
What am I missing? I can't seem to delay this even though the syntax seems correct.
window.location.reload(true).delay(800);//true= hard refresh
Upvotes: 1
Views: 2035
Reputation: 36438
reload()
doesn't return anything that I know of; certainly not a jQuery object, or any object on which delay()
could be called.
Not that it matters - reload()
takes effect immediately.
You want to use setTimeout()
to delay the actual call to reload()
setTimeout(
function() {
window.location.reload(true);
}, 800);
Upvotes: 2