Update: Old post (2020) - you can now use if you want (See Browser compatibility in the link below):
By JS => Start point
Less than one minute. Collection listparagraph inside bind to collection field description with class post-description (We going to use this class as jquery class selector)
Hi there. This works but I have issue when I am in a tabbed content. The first page works but when I toggle to another tab, the script does not seem to be called. Any clue?
UPDATE:
I found that custom scipt only works on the first active tab as the scipt will not load when you toggle to another tab.
If any of you have a solution to this, let me know. Thanks in advance!
If you need this on multiple pages then you can add it to the custom code settings in your project settings. Just wrap in the style tags that I included and paste into the Inside <head> tag section. DOn’t forget to make sure the class name matches your element too.
The -webkit-line-clamp the number here is the number of lines you would like. It will automatically add the ellipsis if it’s needed. You may want to double check this works in Firefox, but I’m pretty sure it does now.
Works like a charm, thank you!
How can I make it so that, when the user clicks on the ellipsis (or a button or arrow) at the end of the truncated text, the text extends to show the full text?