Hi!
I toyed around with .load() and .ajax(), but i didn't get to an end. Here's what I need: Everey minute the function shall check if it can load a certain page. if the connection succeeds, I want the page to be refreshed, if not, nothing shall happen, the script shall retry later.
I'm using the jQueryTimers plugin. this is my code so far:
//reload trigger
$(document).everyTime('60s', 'pagerefresh', reloadPage, 0, true);
//refresh function
function reloadPage() {
$.ajax({
url:'index-1.php',
type:'HEAD',
success: location.reload(true)
})
}
I have no idea how to tell jQ what I want. any hint appreciated.