fexi
fexi

Reputation: 5

jQuery dialog: height always zero

I need to implement the jquery dialog into an existing backend. Here's my code for opening a dialog window:

$("#dlg").dialog({
    width   :   900,
    height  :   600,
    modal   :   true
});

This should be correct. The problem is that the dialog's height is always zero, it will only display the titlebar. I've also checked the CSS, there's no additional styles applied to #dlg.

I checked the dialog container markup using firebug and it shows height: auto; which seems to be the problem, it should be 600. Any ideas what could be wrong?

Upvotes: 0

Views: 657

Answers (1)

stackr
stackr

Reputation: 2742

To set height after initialisation:

//getter
var height = $( ".selector" ).dialog( "option", "height" );
//setter
$( ".selector" ).dialog( "option", "height", 530 );

For more info see: http://docs.jquery.com/UI/Dialog/dialog#options

Upvotes: 1

Related Questions