0
votes

I have a problem with jQuery-UI dialog. It openes normally, but after opening title bar and close button are not visible.

enter image description here

Title bar and close button should look like this:

enter image description here

I really don't understand why they are hidden. Close button is functioning normally, although it's hidden.

My source code is here

Code for opening dialog is quite simple:

 $( "#dialog" ).dialog({
  autoOpen: false,
  show: {
    effect: "blind",
    duration: 1000
  },
  hide: {
    effect: "explode",
    duration: 1000
  },
  title: "This is my title"
});

$( "#opener" ).on( "click", function() {
  $( "#dialog" ).dialog( "open" );
});

Source files:

Scripts:

https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/jquery-1.11.0.min.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/jquery-ui-1.10.4.custom.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap.min.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/jqBootstrapValidation.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/json3.min.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/jquery.cookie.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap3-typeahead.min.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap-datepicker.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap-datetimepicker.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap-timepicker.js https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/common.js

Styles:

https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap.min.css https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/datepicker3.css https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap-datetimepicker.css https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap-timepicker.css https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/jquery-ui-1.10.0.custom.css https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/common.css https://s3-us-west-2.amazonaws.com/s.cdpn.io/554096/bootstrap-custom.css

3
Have you got any CSS that might be overriding it?Deckerz
How can I check this?FrenkyB
Can you post the full source code? So we can see it all and test it ourselves to see what is going wrong. Or you can just inspect element it to see styles on the right sideDeckerz
This is all that I have. Source files are visible under 'JS' and 'CSS'. Or have you meant something else?FrenkyB
I've added source files (scripts and styles) to my question.FrenkyB

3 Answers

1
votes

This can be considered as quick fix.

.ui-dialog-titlebar{background-color:#c2c2c2;}
.ui-dialog .ui-dialog-titlebar-close
{
  background-image: url(https://cdnjs.cloudflare.com/ajax/libs/aui/6.0.1/aui/css/icons/aui-icon-close.png);
  z-index:999999;
}

But at times this might work.

0
votes

The CDN of jquery you were using are blocking the ui-images

s3-us-west-2.amazonaws.com/s.cdpn.io/554096/images/ui-bg_glass_75_ffffff_1x400.png Failed to load resource: the server responded with a status of 403 (Forbidden)

Use the jquery-ui css and js from another CDN, example:

https://cdnjs.com/libraries/jqueryui

0
votes

The only problem was that I was using jQuery-UI and bootstrap at the same time. Bootstrap overrided some jQuery-UI classes.