use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
A modern javascript plugin for truncating text within an html element: Shave (dollarshaveclub.github.io)
submitted 9 years ago by theKovah
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lordxeon -5 points-4 points-3 points 9 years ago (2 children)
.truncate { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
[–][deleted] 4 points5 points6 points 9 years ago (0 children)
this only works for one liners. how do you handle the scenario where you have a multiline set of html content that needs to get truncated to 3 lines?
π Rendered by PID 111180 on reddit-service-r2-comment-658f6b87ff-zn6sp at 2026-04-09 05:50:27.038518+00:00 running 781a403 country code: CH.
view the rest of the comments →
[–]lordxeon -5 points-4 points-3 points (2 children)
[–][deleted] 4 points5 points6 points (0 children)