0
votes

Android phonegap back button :

We can implement back button using phonegap if the app is based on html pages, that is , when a app navigated from page1.html to page2.html , the back button can be implemeneted . But, my app is completely written in a single web page, with javascript functions and events . I kept a top menu containing menu items . When any of the menu item is clicked,a click event occurs and some query and finally result will be produced on the div by replacing it sold contents . So, how can i implement back button here, will provide more information if necessary . Thanks

1

1 Answers

0
votes

You can use URL hashes to do this. They allow you to create pseudo URLs which can be navigated. Google "url hash change".

This is a jquery plugin that allows you to manage hashes and respond to changes http://benalman.com/projects/jquery-hashchange-plugin/