V
V
valitskiydmitriy2015-10-25 17:15:14
JavaScript
valitskiydmitriy, 2015-10-25 17:15:14

jQuery and using mobile buttons?

Good evening everyone! Asked here a question, I do application using IntelXDK. There is a simple function:

$(document).on("click", ".uib_w_9", function(evt)
    {
        $('#indexlist').slideUp();
        $('#actionslist').slideDown();
    });


Is it possible to make that by pressing the "back" button directly on the mobile phone, #indexlist appears back?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radiks Alijevs, 2015-10-25
@dedalik

Register when pressing the back button:
Pressing the back button

document.addEventListener("intel.xdk.device.ready",function() {

    //start grabbing the Android hardware back button
    intel.xdk.device.addVirtualPage(); 
    
},false);

document.addEventListener("intel.xdk.device.hardware.back", function() {
    
    //continue to grab the back button
    intel.xdk.device.addVirtualPage(); 
    
    window.location.hash = 'indexlist';
    
}, false);

hardware.back Event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question