Skip to content

Instantly share code, notes, and snippets.

@tqc
Created April 19, 2012 12:24
Show Gist options
  • Save tqc/2420690 to your computer and use it in GitHub Desktop.
Save tqc/2420690 to your computer and use it in GitHub Desktop.
jQuery mobile dialog transparency fix
.ui-dialog-background {
opacity: 0.5;
display: block !important;
-webkit-transition: opacity 0.5s ease-in;
}
.ui-dialog-background.pop.in {
opacity: 1;
-webkit-transition: opacity 0.5s ease-in;
}
.ui-dialog {
min-height: 100% !important;
background: transparent !important;
}
$(function() {
$('div[data-role="dialog"]').live('pagebeforeshow', function(e, ui) {
ui.prevPage.addClass("ui-dialog-background ");
});
$('div[data-role="dialog"]').live('pagehide', function(e, ui) {
$(".ui-dialog-background ").removeClass("ui-dialog-background ");
});
});
@mauiflipper
Copy link

Can you make an example of this in FS Fiddle with the new JQM 1.3.1?

@angelfangulo
Copy link

Ok. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment