私はjQueryプラグインを書いていますが、これをやろうとしています:
$(this).height>=options.maxHeight ? 
$(this).css({overflow:"auto"}) : 
$(this).css({overflow:"hidden"})
ただし、機能していません。以前に JavaScript でこのメソッドを使用したことがあります。
これは、可能な限り小さなコードを使用しようとしていただけです。
if($(this).height()>=options.maxHeight)
{
     $(this).css({overflow:"auto"});
}
else
{
     $(this).css({overflow:"hidden"});
}