jQuery plugin to substring long paragraphs and make expandable with "more" and "less" links.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.rdoc
jquery.readmoreless.js
jquery.readmoreless.min.js

README.rdoc

jQuery.readmoreless

author

Arwid Bancewicz arwid.ca

version

0.1

updated

23 Feb 2011

Minimize long paragraphs and make expandable with “more” and “less” links. Either collapse to a length or a selector.

Usage

To collapse to a length:

$(".bio").readmoreless();

$(".bio").readmoreless({
  substr: true,
  substr_len: 500,
  ellipses: '…',
  more_link: '<a class="more">Read&nbsp;More</a>',
  less_link: '<a class="less">Read&nbsp;Less</a>'
});

To collapse to a selector:

$(".bio").readmoreless({
  substr: false
});

$(".bio").readmoreless({
  substr: false,
  less_selector: ":first",
  ellipses: '&#8230;',
  more_link: '<a class="more">Read&nbsp;More</a>',
  less_link: '<a class="less">Read&nbsp;Less</a>'
})

License

jQUery.readmoreless is covered by the MIT License.