I am trying to get the height of a JQuery UI’s dialog’s div once opened, so that I can set the parent’s iframe height dynamically.
However it seems to be returning me the height of the div before the footer button panel and title panel are added. The height for the dialog is set to “auto”;
$(this).height($('#dialogdiv').height());
I have tried, outerHeight and offset Height aswell, but get similar results.
Any ideas?
The
divyou call.dialog()on is actually embedded into another framework of divs that make up the actual jQuery UI Dialog that displays. What you will want to call is this:You also may still need to play with
outerHeightbut the important part is theclosestwhich will get the outer dialog wrapper for the Dialog.If your code looked like this to start:
After calling
.dialog({ options })it will look like this (Very simplified):