A smooth, responsive jQuery plugin for collapsing and expanding long blocks of text with "Read more" and "Close" links.
The markup Readmore.js requires is so simple, you can probably use it with your existing HTML—there's no need for complicated sets of `div`'s or hardcoded classes, just call `.readmore()` on the element containing your block of text and Readmore.js takes care of the rest. Readmore.js plays well in a responsive environment, too.
Readmore.js is tested with—and supported on—all versions of jQuery greater than 1.9.1. All the "good" browsers are supported, as well as IE10+; IE8 & 9 _should_ work, but are not supported and the experience will not be ideal.
You can remove the Readmore.js functionality like so:
```javascript
$('article').readmore('destroy');
```
Or, you can be more surgical by specifying a particular element:
```javascript
$('article:first').readmore('destroy');
```
### Toggling blocks programmatically:
You can toggle a block from code:
```javascript
$('article:nth-of-type(3)').readmore('toggle');
```
## CSS:
Readmore.js is designed to use CSS for as much functionality as possible: collapsed height can be set in CSS with the `max-height` property; "collapsing" is achieved by setting `overflow: hidden` on the containing block and changing the `height` property; and, finally, the expanding/collapsing animation is done with CSS3 transitions.
By default, Readmore.js inserts the following CSS, in addition to some transition-related rules: