I'm using jquery mobile to building a site but when I click on a button and this button points to a dialog page, in the URL appears #&ui-state=dialog
. If I put in the <a data-ajax="false"></a>
the url is correct without #&ui-state=dialog
but the dialog window doesn't show correctly because obviously ajax is disable.there is some way to fix it?
Try to use data-history="false" in the popup div tag like:
<div data-history="false" data-role="popup" id="options-list-div" data-theme="b" data-overlay-theme="b">
Good luck! :-)
When you open the dialog, use $.mobile.changePage()
and set the changeHash
option to false
: http://jquerymobile.com/demos/1.0.1/docs/api/methods.html
//delegate the event binding so elements in the DOM now and in the future will be bound-to
$(document).delegate('#my-dialog-button', 'click', function () {
//change to the dialog, forcing the hash to remain the same and the page to be viewed as a dialog
$.mobile.changePage($('#my-dialog'), {
changeHash : false,
role : 'dialog'
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With