Can I fix the width and the height of jQueryMobile dialog? Currently, the size of width is 100% which is really awful in iPad.
$( ". selector" ). dialog({ width : 120 });
Below is how I achieved a responsive jQuery UI Dialog. To do this, I added a new option to the config - fluid: true , which says to make the dialog responsive. I then catch the resize and dialog open events, to change the max-width of the dialog on the fly, and reposition the dialog.
You can set the page width of the dialog, Live example: http://jsfiddle.net/bXPTd/3/
<div data-role="page" id="bar">
<a href="#foo" data-role="button" data-inline="true" data-rel="dialog" data-transition="pop">Open dialog</a>
</div>
<div data-role="page" id="foo" style="width:300px;">
Hello Foo
<a href="#" data-role="button" data-rel="back">Close dialog</a>
</div>
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