How can I get/set the height of an hidden element by jquery?
<div id="test" style="display:none">...</div>
$("#test").height() return 0
$("#test").height(30) return exception.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yo should do (with quotes):
$("#test").height()returns 0 if you don’t define a default width in an external css and if the element is hidden.