Vra

I'm using Jquery mobile v1.4, how to refresh(reload) page when click button ?

Also which one is loads faster between refresh/reload ?

<a href='#' class='btnRefresh'>Refresh</a>
Was dit nuttig?

Oplossing

You can try some thing like this

Call the given JS function on click of your anchor tag

function refreshPage() {
  $.mobile.changePage(
    window.location.href,
    {
      allowSamePageTransition : true,
      transition              : 'none',
      showLoadMsg             : false,
      reloadPage              : true
    }
  );
}

for more detail click here

I hope this helps you!

Ander wenke

try to use this JavaScript function location.reload();

Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top