$.fn.findMaxHeight = function() {
var wrapperHeight = $(this).height();
var wrapperMaxHeight = $(this).css('max-height');
if ( wrapperHeight == wrapperMaxHeight ) {
alert("max-height reached");
} else {
alert("not yet");
}
}
$('.subscription-wrapper').findMaxHeight();
$('.payment-wrapper').findMaxHeight();
… doesn’t work because .css() returns 300px and .height() returns 300 so they can’t be compared. how do I fix it?
Just use
parseInt.Specifically,