Hash page and backgutton issue phonegap + jQuery

I am new to programming telephone calls and hope someone can help me here:

cordova 1.7.0, jQuery 1.7.2, and JQM 1.1.0. The application is being tested on Android.

I am trying to create a launch page for an application.

<body>    
    <div data-role="page" id="page_loading">
        <div data-role="content">
            <h1 >
                <b>welcome</b>
            </h1>
        </div>
    </div>

    <div data-role="page" id="page_1">
    </div>

    <div data-role="page" id="page_2">
    </div>    
</body>

I put $.mobile.changePage($('page_1'), { changeHash: false});at the end of the function onDeviceReady(). When the application starts, it immediately shows the download page after the download is complete, it goes to the first page.

On the first page, when I click the button on page_1, it will exit the application. This is what I want.

mobile.changePage, 2. changeHash: false, backbutton . changeHash: true, _1, .

changeHash: true 1, 2 , , .

: backbutton . 2, . 3 .., 1?

, - / . - , ?

+1
3

, :

:

<body>    
    <!-- page_1 before page_loading in source -->
    <div data-role="page" id="page_1">
    </div>
    <!-- page_loading will be shown first -->
    <div data-role="page" id="page_loading">
        <div data-role="content">
            <h1 >
                <b>welcome</b>
            </h1>
        </div>
    </div>
    <div data-role="page" id="page_2">
    </div>    
</body>

JQuery

function onBodyLoad()
{   
    //go to page_loading before deviceready without keeping it in browser history
    $.mobile.changePage('#page_loading', {reverse: false, changeHash: false});
    document.addEventListener("deviceready", onDeviceReady, false);
}

function onDeviceReady()
{   
    //your initialization code here...

    //now go to page_1 without keeping it in browser history since the actual first page was #page_1 already       
    $.mobile.changePage('#page_1', {reverse: false, changeHash: false});

    //your code here...
}

, ...

0

jquery-1.7.1 jquery-1.7.2, . JQM , jQuery 1.6.4 1.7.1. 1.7.1 , ?

( 1.8.0 JQM)

0

, , , :

onPageBeforeShow "splashDisplayed", , , . , boolean true, , .

$(document).on("pagebeforeshow", "#splash", function () {
if(!splashDisplayed){
    splashDisplayed=true;
}else{
    navigator.app.exitApp();
}
});
0

All Articles