Response title
This is preview!
$(document).on('pagecreate',"#br_smsDetails",function(){
// this event works as exkpected.
$(this).on('pagehide',function(){
console.log('this page hide');
omenu.runCode('textmessage');
});
//this event fires for both the parent page as well as the new page
// I had to add the if condition to only fire on the new page
$(":mobile-pagecontainer").on('pagecontainerhide',function(e, ui){
if (ui.prevPage[0].id == 'br_smsDetails') {
console.log(':mobile page hide');
}
});
// this does not work
$("body").on('pagecontainerhide',"#br_smsDetails",function(){
console.log(':mobile page hide with id');
});
// this does not work
$("#br_smsDetails").on('pagecontainerhide',function(){
console.log('page name hide');
});
})
© 2013 jQuery Foundation
Sponsored by and others.