Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make jQuery UI dialog not resizable

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')
like image 661
Omu Avatar asked Feb 08 '10 10:02

Omu


2 Answers

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');
like image 115
rahul Avatar answered Oct 17 '22 23:10

rahul


Or simply:

$('#mydiv').dialog({resizable: false}); 
like image 10
Bob Avatar answered Oct 18 '22 01:10

Bob