I\'m wondering how to refresh/reload a page (or even specific div) once(!) using jQuery?
Ideally in a way right after the DOM structure
is available (c
You don't have a jQuery refresh function, because this is JavaScript basics.
Try this:
<body onload="if (location.href.indexOf('reload')==-1) location.replace(location.href+'?reload');">
Use this instead
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
<a href="javascript:timedRefresh(2000)">image</a>
window.location.href=window.location.href;
You may need to use this
reference along with location.reload()
check this, it will work.
this.location.reload();
Try this code:
$('#iframe').attr('src', $('#iframe').attr('src'));
To reload, you can try this:
window.location.reload(true);