Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize jquery UI dialog with JS?

Even better would be if autoResize in latest branch would work as intended, but till then the question is simple: how to resize a dialog once it is created?

like image 526
pentarim Avatar asked Jan 04 '09 10:01

pentarim


2 Answers

$('#dialog').dialog().animate({width: "700px"}, 400);

I've used this for dynamically resizing dialogs.

like image 86
JNB Avatar answered Sep 23 '22 21:09

JNB


The answer from is Soviut is correct for v1.5. 1.6 adds an option method to each plugin:

$(document).ready(function(){
    var d = $("#example").dialog();
    d.dialog("option", "width", 700);
});
like image 45
rdworth Avatar answered Sep 23 '22 21:09

rdworth