The dialog itself only occupies about 10% of the page and I wanted to remove or turn the dialog's page background into transparent so that the previous page will still be visible.
This is the js that calls the dialog:
$.mobile.changePage('#popdiv',{transition:'slide', role:'dialog'});
and this is the div
<div data-role="page" id="popdiv" data-role="page" data-theme="e">
<div data-role="content">
<h1>Congrats!</h1>
</div>
</div>
I tried using custom css but it doesn't seem to change anything
div#popdiv {
background: none; // i also used background-image and color and set it to none
}
and this is how i declared the css and js
<custom css>
<jquery mobile css>
<jquery min.js>
<phonegap.js>
<custom.js>
<jquerymobile.js>
Please help. many thanks.
The accepted answer suggests using a third party dialog for jQuery Mobile. If you want to use the existing inbuilt dialog, then the following will work:
My CSS order looks like this:
My custom CSS (post theme and JQM mobile structure CSS):
And JavaScript when page loads:
Source: Tom Clarkson
For jQuery >1.9, live() is removed. Thus you habe to modify the JavaScript that Junto has posted above to following:
Just add this to your css
That works for me.
I have found this:
https://github.com/jtsage/jquery-mobile-simpledialog
This is a jquery mobile plugin and it's what I exactly want. :)