dsekon / dreadmore Goto Github PK
View Code? Open in Web Editor NEWThe plugin for collapsing and expanding long blocks of text. min-height: 1px - 1 line. DISABLE it using CSS!
Home Page: https://dreadmore.DSekon.com
License: MIT License
The plugin for collapsing and expanding long blocks of text. min-height: 1px - 1 line. DISABLE it using CSS!
Home Page: https://dreadmore.DSekon.com
License: MIT License
Hi there!,
Thanks for this awesome plugin. I have found a issue on your plugin. when I wrapped content by any kind of html tags your plugin doesn't calculate default margin. that's why this plugin doesn't match with proper height of the content . Is there any solution?
Issue: https://prnt.sc/26lu2ya
Regards.
Abu Talib
As the title says, nothing happens when the screen is resized, even though the plugin's returnInitialState
setting is set to true
.
Any thoughts on this?
Many thanks!
Min-height is not working correctly when applying dReadMore to an element which contains more then one <p>
tag.
Is there a way to solve this?
@DSekon I love the plugin, but as the title says, this problem is a deal breaker to me, since I need the "Read more" functionality to be available for paragraphs where the text amount is highly variable.
More specifically, I intend to use it for user comments. Here's what I'm getting:
My settings:
// JS
$(".d-readmore").dReadmore({
startOpen: false,
});
// CSS
.d-readmore {
min-height: 3px;
overflow: hidden;
}
Frankly I was thinking of programatically checking the character lenght of comment, and excluding the button in PHP, unless the comment is longer than xyz chars, but I feel like this would almost defeat the plugin's purpose. Is there any workaround to this issue?
On a side, totally unrelated note, is there any way of adding the "ellipsis" character (...) at the end of the initially-visible paragraph, i.e. before the text block is expanded?
Thanks a lot!
const dreadmore = new DReadMore({
initialExpand: false,
isInitialExpandWhenUpdate: false,
moreText: '+',
lessText: '-'
});
$(window).on('resize', function(){
dreadmore.update();
});
The update function is not triggered in the example above. Same happens with the function outside of the window resize event.
On the console I see Uncaught TypeError: dreadmore.update is not a function
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.