开发者

How do I over write the styles on a jQuery dialog

I want to create a jQuery dialogue and overwrite the color setting for this one instance, not any others - now creating the dialog is easy but setting it's styles is providing difficult, how do I change the title and overlay colours? I'd like to add them dynamically here, something like background:"red", as I don't want to change any css files I don't mind dynamically updating the CSS values via jQuery for this one modal.

Here's my code

(document).ready(function() {
            var $dialog = $('<div id="dynamicDiv"></div>')
            .html('Loading... <img src="../ajax-loader2.gif" alt="Loading" />')
                    .dialog({
                        bgiframe: false,
                        autoOpen: f开发者_运维知识库alse,
                        draggable: false,
                        modal: true,
                        resizable: false,
                        show: 'slide',
                        height: 60, 
                        closeOnEscape: false,
                        title: '',

                    });

        $dialog.dialog('open');


Like this:

$dialog.closest('.ui-dialog').css('background', 'red');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜