In ios7 safari apple introduced swiping navigation - swipe to the right sends windows.history.back() event and redirects to a previous page like user touched the back button.
In my app I am using right swipe to show left panel and I am using this code:(JQM 1.4.3 stable)
<script>
$( document ).on( "pageinit", ".ui-page", function() {
$( document ).on( "swiperight", ".ui-page", function( e ) {
if ( $.mobile.activePage.jqmData( "panel" ) !== "open" ) {
if ( e.type === "swiperight" ) {
$( ".panel" ).panel( "open" );
}
}
});
});
</script>
But instead of showing the panel safari rather uses it's default behaviour and loads the previous page. How to override this behaviour and show left panel?