-
Notifications
You must be signed in to change notification settings - Fork 132
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
Adding "More" text after ellipsis, inline #31
Comments
I was trying to do the same thing but I couldn't make it. Please help us |
You can use the code (http://pastebin.com/ARTYQUuc), which was built on top of Pablo Pazos by gi. The link was found in the comment section of http://viralpatel.net/blogs/dynamically-shortened-text-show-more-link-jquery/ However, you do need to add |
I made a version with some alterations to include an option I also removed some commented-out console.logs and trim the incoming text and html so that preceeding whitespace won't affect the letter count. Those changes should be easy enough to remove if you don't want them. I'm not making a PR at this time because it does make the code a lot more complicated. |
In the inline version, there is a bug. The else of this section " if (c.indexOf('<') >= 0)" does not add the read more link. So, if it cuts on something not on the open tag etc, you get nothing. |
Hi, Thank you so much for this, exactly what I was looking for!
One change I hope to make though. I would like to place the "more" link next to the ellipses, inline.
So it reads:
co-founder of an events management ... more
Can you put me in the right direction, please.
The text was updated successfully, but these errors were encountered: