jsillitoe / jquery-condense-plugin Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to condense and truncate blocks of text into smaller blocks and provide smooth animation for expanding.
License: GNU General Public License v2.0
jQuery plugin to condense and truncate blocks of text into smaller blocks and provide smooth animation for expanding.
License: GNU General Public License v2.0
For example:
Assume that fullbody == "1234 123456789012345678901", opts.condensedLength == 6, and delta == 1.
In that case, loc will be 7, and $.trim(fullbody.substring(0,(loc+1))) will return "1234".
Since "1234".length == 4 which is less than opts.condensedLength, the do-while loop between lines 87 and 97 will be infinite.
This, of course, crashes browsers.
Nice plugin although no need for the meta data plugin with the HTML5 data attributes.
E.g:
var o = $this.data('plugin-options') ? $.extend({}, opts, $this.data('plugin-options')) : opts;
<div class=condense' data-plugin-options='{"condensedLength":"50"}'></div>
Hi, can anybody help me to figure out how to move the ellipsis (...) to output inline next to the truncated text? I need to have the 'more' link on its own line which I have done using css but i can't see how to move the '...' to append inline at the end of the truncated text?
Here is an example of how I would like my finished text block to look (notice the different placement of the '...' :
Example text lorem ipsum dolor ...
Read More
but all I can get is:
Example text lorem ipsum dolor
... Read More
Looking at the plugin code, I can't see where in the code I can change where the ellipsis is output?
Many Thanks for any help..
condensedLength property appears to make IE8 go completely unresponsive. Any value, any setting, as long as this property is being used in the code, IE goes unresponsive. This has been verified in your demo file and my own implementation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.