🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

readMore is a lightweight, cross-browser jQuery multi-line text truncation plugin that allows to excerpt your long text content depending on number of lines.

Text-Truncating

Documentation

readMore

jQuery plugin that cuts text at required length and replace the rest with "... Read More" link, redirecting to the full article.

  • Easily customizable
  • Pretty lightweight
  • Doesn't rely on external libraries (besides jQuery)

How to use:

Make sure to include jQuery in your page:

<script   src="https://code.jquery.com/jquery-3.2.1.min.js"   integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="   crossorigin="anonymous"></script>

Include jQuery readMore:

<script src="js/readMore.jquery.js"></script>

Function call:

using jQuery selector select the property you want to apply the readMore fn. Define the max numberOfLines that are required for your needs throught key - value

Example

$(".element").readMore({numberOfLines: 5});

Browser support:

  • Firefox (v 45 +)
  • Chrome
  • Safari
  • Internet Explorer 7+
  • Safari

You May Also Like