I firstly tried to change the opacity
on my dialog function like that :
open: function(event, ui) {
$('.ui-widget-overlay').css({ opacity: '.5' });
},
But it didn't work, I tried to override the opacity
again by trying to modify the css function like this:
$(".ui-widget-overlay").css("cssText", "height: 0 !important;");
https://stackoverflow.com/a/25818398/10347292
But it didn't work aswell, here is the opacity of the acutal modal (i want to change it to 0.5) :
Here is my final code :
html code :
<div>
<img id="elem" src="https://i.stack.imgur.com/flekn.png" alt="Orange">
</div>
JS code (jquery method) :
function enlargeImage() {
$('#elem').click(function () {
$('#elem').dialog({
title: "Image",
modal: true,
width:'auto',
open: function(event, ui) {
$(".ui-widget-overlay").css("cssText", "height: 0 !important;");
},
close:function() {
$(this).dialog('destroy').remove();
}
});
});
}
$(document).ready(function(){
enlargeImage();
});
Furthermore, i'm working on a big project, so i can't modify the CSS page opacity because it will touch all the others dialog using this opacity
, i can only modify this properties with jQuery
...