I am trying to calculate the innerwidth of jquery dialog (ui-1.8)
For somereason it is always returning 0. One reason perhaps is that the dialog is still hidden and not open??
Was using
$('#dialogId').innerwidth()
Any help?
I am trying to calculate the innerwidth of jquery dialog (ui-1.8)
For somereason it is always returning 0. One reason perhaps is that the dialog is still hidden and not open??
Was using
$('#dialogId').innerwidth()
Any help?
Give this method a shot, from SO post. It worked for me in past: http://stackoverflow.com/questions/1472303/jquery-get-width-of-element-when-not-visible-display-none
You set the visibility to hidden and display to block, then check width then revert.
Seems like you are correct. innerWidth()
in fact changes according to the element visibility.
Check this example