Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion page-params/jqm.page.params.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 );
})( jQuery, window );