jquery mobile, use android hardware back button to close a panel
I created a panel using jqm, and I'd like to be able to use the andoird
phones back button to close it when it's open.
For now, when the panel is open and I use the back button, it goes to the
previous page, instead of only closing the panel.
Any idea how to do this ?
Here's the structure of my js file for the panel :
$(document).on('pagebeforecreate', '#welcome-page', function(){
$(document).on('click', '#open-panel', function(){
$.mobile.activePage.find('#mypanel').panel("open");
populateContactForm('args');
...
});
$(document).on('change', '#mypanel input[type=radio]', function(){
...
});
});
Thanks
No comments:
Post a Comment