Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide readmore if text fits #248

Open
mkotsovoulou opened this issue May 31, 2020 · 1 comment
Open

Hide readmore if text fits #248

mkotsovoulou opened this issue May 31, 2020 · 1 comment

Comments

@mkotsovoulou
Copy link

Hello, Is there a way to hide the read more when the text in the div fits its height?

@JorisLambrechts
Copy link

I just loop over all the elements and check the height:
$('.text').each(function(){ if($(this).height() > 100){ $(this).readmore({ speed: 75, collapsedHeight: 100, lessLink: '<a href="#">Read less</a>' });; } });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants