February 1, 2017, 10:38am
Do you guys know of a good working native js script (or jquery or similar) to truncate a text / title length with a specified number of character? Without truncating words (because it’s not readable otherwise).
Example : My long ass title that’s so long it can’t fit to a nice design
Shorten to 30 chars : My long ass title that’s so…
I’d like to be able to apply this rule to any H3 Title with the class “.longtrend” for instance.
Thank you in advance for your help!
February 1, 2017, 10:44am
In case of you dont know about this simple CSS rule:
Is it possible to have text entered into the CMS be truncated once it’s added to the page?
For example I have a field for the client to add in a description of their services and I want to use the first 100 characters of that field as the snippet text on the directory page of their website.
And there’s a good read here too:
February 1, 2017, 10:47am
Actually I just saw your post doing a simple search on the Forum!
It works great, but how do I define how many chars I want before it gets truncated?
Here’s what I have with a 70px width:
What I’d like:
February 1, 2017, 11:25am
It’s an overflow, so it is defined by the container.
CSS-tricks to the rescue?
February 1, 2017, 11:30am
Merci Vincent you’re so swift and swag… Or shall I say: Shwifty
February 1, 2017, 11:33am
I’m going to have to google all that before thinking anything about it… ;-p
February 1, 2017, 1:16pm
awesome. I’ve been looking for something similar. Thanks
SHWIFTY… ahhh. hm. ok ? PG13 warning.
EDIT… it displayed the text from the site. Replace X with Shwifty
February 1, 2017, 2:24pm
that was unexpected… still laughing
February 1, 2017, 11:06pm
@AlexManyeki Nailed it.
Being Shwifty /shwifty/ (noun) :
Being the world’s best effort. That’s what.
April 3, 2017, 8:06pm
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.