I have a video page with video description. Now I want to show description with 2 lines by default and below the description will be a 'Read More' button.
But if the description is less than or equal to 2 lines, I don't want to show the 'Read More' button. 'Read More' button will be shown only when description will be more than 2 lines.
I need this to be done completely with JS or jQuery.
Here is what I have tried so far with no luck.
<div class="video-description" style="line-height:1.2em;max-height:4.8em;">
<p>
Description Line 1
Description Line 2
Description Line 3
</p>
</div>
<div class="read-more-button">Read More</div>
if ($('.video-description').css('height') <= '67px' {
$('.read-more-button').hide();
} else {
$('.read-more-button').show();
}