Hi All,
I am trying to implement backButton when pressed confirm from user if he wants to exit the app.
I do not know why the event module not been executed:
$(’.open-confirm’).on(‘click’, function () {
app.dialog.confirm(‘You want to exit the application?’, function () {
});
The segment of code is not executed and it is not giving any error:
import $ from ‘dom7’;
document.addEventListener(‘deviceready’, function () {
document.addEventListener(“backbutton”, onBackKeyDown, false);
function onBackKeyDown() {
$('.open-confirm').on('click', function () {
app.dialog.confirm('You want to exit the application?', function () {
});
});
}
}
Thanks