How to modify jQuery mobile history Back Button behavior

后端 未结 6 1411
忘了有多久
忘了有多久 2020-12-13 21:47

I\'ll start this off with I have researched a bit, but no solution that solves what seems like it should be a simple JQM modification.

I have a wine review webapp th

6条回答
  •  轮回少年
    2020-12-13 22:17

    I wrestled with this recently as well. After thinking about it, I realized I could rewrite my JQM application to use Pop Up "windows" for those pages that I didn't want in my history. This ended up being an easier and cleaner fix than mucking around with browser history.

    Now users can intuitively use the browser back button, and I don't have to code application back buttons.

    The only thing you have to ensure is that the popups don't themselves make it into the browser history, so make sure to set the "history" option to false like so:

    $('#some_popup').popup( { history: false } );
    

提交回复
热议问题