how to reload a page without noticing the effect using jquery mobile

how to reload a page without noticing the effect using jquery mobile

i want to create a clickable button to reload the page without noticing the reload effect in jquery mobile or is there any way to make refresh occur automatically....

I found this code online , here  http://scottwb.com/blog/2012/06/29/reload-the-same-page-without-blinking-on-jquery-mobile/

  1. <script>
    function refreshPage() {
      $.mobile.changePage(
        window.location.href,
        {
          allowSamePageTransition : true,
          transition              : 'none',
          showLoadMsg             : false,
          reloadPage              : true
        }
      );
    }
    </script>
i have tried onclick event but its no working.
any help please. 
All i want is to reload a page without my user noticing that this page is being reload whether manually or automatically

<input type="button" value="Reload" onClick=" refreshPage ()">Reload</button><br>