How to draw bar of a modal

3

Hello, how do I get this gray bar on top of the modal?

$(function(){vardialog,form,dialog=$("#painel_fazer_upload" ).dialog
        ({
          autoOpen: false,
          height: 520,
          width: 500,
          modal: true,
        });

        $( "#painel_upload" ).button().on( "click", function()
        {
          dialog.dialog( "open" );
        });
    });
    
asked by anonymous 22.05.2015 / 20:31

2 answers

2

You can remove the background and gray border of the modal title by overwriting the original jQuery UI CSS as follows:

.ui-dialog-titlebar{
    //tira a cor de fundo cinza
    background: transparent;
    //tira a cor da borda
    border: none;
}

Do not forget to add these lines immediately after adding the jQuery UI CSS file so that these class rules are rewritten.

Another option is to change them directly in the CSS file if possible.

    
22.05.2015 / 20:39
1

You should do this with CSS. The class that has this div is .ui-dialog-titlebar and if you use CSS it is automatically invisible for all dialogs. You can do this:

.ui-dialog-titlebar{
  visibility: hidden !important;
}

Example: link

If you want to change the color you can change parameters in the CSS as background-color , border , or specifically border-color .

You can also do this with JavaScript / jQuery. In that case something like $('.ui-dialog-titlebar').css('visibility', 'hidden'); or apply a CSS class.

Example via JavaScript: link

    
22.05.2015 / 20:34