Reputation: 68670
Is there any way to find out the pre-defined max-height
(css property) of an element?
I want to find the height with .height()
and compare with css max-height
and add add class if max-height reached.
Upvotes: 0
Views: 82
Reputation: 2624
You can use .css('max-height')
but if you want a number you have to drop "px" (or other unit) part:
parseInt($("element").css('max-height'),10)
Upvotes: 1
Reputation: 77976
$('#myDiv').css('max-height');
Demo: http://jsfiddle.net/F9DPh/
Upvotes: 3