jQuery Read More “text abbreviator” plugin

  • jQuery Read More “text abbreviator” plugin, 5.0 out of 5 based on 1 rating


    readmore jqueryIf you have a lot of user-generated content that you don’t limit the length on, so it can grow very large. To combat this, there is the UI pattern: a “read more” link available to show the remaining text for the long-winded texts, while just showing a snippet otherwise. Jquery.readmore is an easy way to do this.

    Default Usage

    <p class="short">
      (long text here)
    </p>
    $(".short").readmore();
    

    Resulting Demo

          

    Setting substring length

    <p class="short">
      (long text here)
    </p>
    
    // adjust per call
    $(".short").readmore({ substr_len: 50 });
    
    // or permanently for all calls
    $.fn.readmore.defaults.substr_len = 50;
    $(".short").readmore();
    

    This delimits the text shown to 50 characters, and is appended with the read more tag.


    Author: Jake Trent
    Repository: Download from jQuery

    Subscribe to Site Help Web Resources Feed

    Make a donation

    GD Star Rating
    loading…

    August 13th, 2010 | Blue | 4 Comments | Tags: ,

About The Author

Steve

Hi I am a webdeveloper based in Brisbane, Australia. Fanatical about the internet and website code and development. Hence this site, a showcase resource site for you to get the latest greatest code , scripts , apps and demos all from the one venue.

4 Responses and Counting...

Leave a Reply

* Name, Email, and Comment are Required