JQuery Mobile NavBar with back button of previous page

On iPhone, when you have NavBar at the top, there is a back button.

Instead of saying "Back", it has the title of the previous page.

So, you can say on the page "Place an order". The name of the NavBar will be “Checkout,” and the button may say “Books.”

By clicking on the button that says "Books", you will return to the previous page.

How can this be done in jQuery mobile without having to enter the code in the form of a back button, since you may have come to this page from a different route?

change

I know I can do this on a page;

<div data-role="page" id="pageViewChallenges" data-add-back-btn="true" data-back-btn-text="previous">

But this makes the button text “previous” instead of the page name.

+5
source share
1

U <a href="previuos_page.html" id="bkbtnid" data-icon="back">Books</a>

( )

<a href="#Id_of_previous_page" id="bkbtnid" data-icon="back">Books</a>

( )

"", , "", "" jquery "" title.IF u , showhow, id back, jquery :

$('#MaterialAndQuantityDetails')
        .live(
                'pagebeforeshow',
                function() {
                    // page header Management
                    $('#bkbtnid').html("");
                    $('#bkbtnid').html(BackButtontext);
 });

, , pagehide

var BackButtontext = document.getElementById('previous_page_header_id').value;

BackButtontext - , .

+1

All Articles