How to load a div every minute
Hi all,
What is wrong the code below, I can't refresh the div I want.
- function fn60sec() {
// runs every 60 sec and runs on init.
var pathname = window.location.pathname;
$( "#user-card" ).load( pathname + " #user-card");
}
fn60sec();
setInterval(fn60sec, 60*1000);