7alhashmi
7alhashmi

Reputation: 924

Dialog Overlay is not working

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

Answers (1)

Explosion Pills
Explosion Pills

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

Related Questions