<div data-role="page" id="page1"> </div> <script> $(document).on("pageshow", "#page1", function(){ // code... }); <script>