Git Product home page Git Product logo

dreadmore's Introduction

dreadmore's People

Contributors

dsekon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

levmyshkin

dreadmore's Issues

Doesn't calculate default margin of heading tags

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

returnInitialState has no effect

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

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?

Button still visible even when the text is shorter than the specified min-height

@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:
Screen Shot 2020-06-12 at 21 33 23
Screen Shot 2020-06-12 at 21 33 46

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!

Update function is not working on window resize event

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.