Friday, 22 July 2011

jQuery .css("height") and .height()

The difference between .css('height') and .height() is that the latter returns a unit-less pixel value (for example, 250) while the former returns a value with units intact (for example, 250px). The .height() method is recommended when an element's height needs to be used in a mathematical calculation.

No comments:

Post a Comment