Assume that the height of an element is set to 'auto'. Trying to get the height in jQuery returns the calculated height. Is there a way to get the actual CSS value (auto) instead of the height in pixels?
$('#myDiv').height() // returns calculated height
It is possible to retrieve the raw CSS value, see this fiddle for the result (tested in Firefox and Chromium)
I used this answer to get the raw css object, and this gist to emulate a required function that is only natively available to Webkit.
After that, accessing the property is easy:
css($('#myDiv')).height
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments