I’ve an Auto Refresh Button in my page. When I click Auto Refresh ON the page should reload, while the Auto Refresh OFF is selected the should not reload. Is this Possible?
Here is my Auto Refresh button Functionality:
$('#refresh').click(function(){
if($('#refresh').attr('class') == 'refresh-off'){
$('#refresh').addClass('refresh-on');
}
else{
$('#refresh').removeClass('refresh-on');
}
});
});
Try setting a timer, then checking the class of #refresh. If set, then refresh the page.
This fiddle shows it working on a 10 second interval.