Calculate innerwidth of a jquery dialog
I am trying to calculate the innerwidth of jquery dialog (ui-1.8)
For somereason it is always returning 0. One reason per开发者_高级运维haps 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: 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
精彩评论