diff --git a/page-params/jqm.page.params.js b/page-params/jqm.page.params.js index d87eaf8..486ce50 100644 --- a/page-params/jqm.page.params.js +++ b/page-params/jqm.page.params.js @@ -71,6 +71,9 @@ function queryStringToObject( qstr ) // The query params for the embedded page are also added as a property/value // object on the options object. You can access it from your page notifications // via data.options.pageData. + +var firstLoad = true; + $( document ).bind( "pagebeforechange", function( e, data ) { // We only want to handle the case where we are being asked @@ -96,7 +99,14 @@ $( document ).bind( "pagebeforechange", function( e, data ) { data.toPage = u.hrefNoHash + "#" + u2.pathname; } } + } else { + if (firstLoad) { + // First page load, so use a changePage to force through param passing magic" + firstLoad = false; + $.mobile.changePage(location.hash); + e.preventDefault(); + } } }); -})( jQuery, window ); \ No newline at end of file +})( jQuery, window );