i have created 3 to 4 different pages in an html. On navigating to 3rd page; on a particular event, i want to refresh that page. Is it possible? If yes, can you please help me with the code?
Thanks in advance
Cheers
i have created 3 to 4 different pages in an html. On navigating to 3rd page; on a particular event, i want to refresh that page. Is it possible? If yes, can you please help me with the code?
Thanks in advance
Cheers
Yes you can refresh like this location.reload()
As you are using jquery mobile and don't want to use reload
try changePage
as below:
var url = location.href;
if (url.indexOf('?r=1') != -1 || url.indexOf('&r=1') != -1) {
url = url.replace('?r=1', '?').replace('&r=1', '');
} else {
if (location.href.indexOf('?') == -1) {
url = url + '?r=1';
} else {
url = url + '&r=1';
}
}
$.mobile.changePage(url);