Reputation: 924
Please tell me why this overlay is not working. I'm planning to pop up a div when the user press at the hlFeedback link.
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#hlfeedback').click(function () {
var dlg = jQuery('div#message').dialog({
width: 608,
height: 750,
modal: true,
overlay: { backgroundColor: "#000", opacity: 0.5 },
buttons: {},
open: function (event, ui) {
$(".ui-dialog-titlebar-close").hide();
}
});
dlg.parent().appendTo(jQuery("form:first"));
});
});
</script>
The div#message is working properly but the only thing is not working is the overlay part. I want to have a black background with opacity 0.5. What is the wrong?!
Upvotes: 1
Views: 3044
Reputation: 191729
jQuery UI dialog doesn't have an overlay
option, but you can change it pretty easily with CSS:
.ui-widget-overlay {
background-color: #000;
opacity: 0.5;
}
Upvotes: 2