How to make jQuery UI dialog not resizable
Asked Answered
H

2

48

Does anybody know how to make the jQuery dialog non-resizable ? At the moment, I call this:

var elem = $("#mydiv");
elem.dialog({
  modal: true,
  title: 'title',
  buttons: {
     Ok: function() {
        $(this).dialog('close');
     } // end function for Ok button
  } // end buttons
}); // end dialog
elem.dialog('open')
Hepner answered 8/2, 2010 at 10:14 Comment(0)
D
110

Use the resizable option

 var elem = $("#mydiv");
 elem.dialog({
    modal: true,
    resizable: false,
    title: 'title',
    buttons: {
       Ok: function() {
          $(this).dialog('close');
       } //end function for Ok button
    }//end buttons
 });     // end dialog
 elem.dialog('open');
Disfeature answered 8/2, 2010 at 10:17 Comment(0)
U
10

Or simply:

$('#mydiv').dialog({resizable: false}); 
Unexceptional answered 8/11, 2015 at 7:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.