Web Development News, Tips, Insights | Website Magazine

Expand & Collapse Text Blocks Easily with Readmore.js

Written by Pete Prestipino | Jul 18, 2013 5:00:00 AM

Internet professionals are quickly learning that, despite the trend toward "minimalist" Web design the past decade or so, there's still a need - and sometimes a demand - for content - sometimes, lots of it.

 

A balance needs to be achieved between the visual and the functional of course and you'll find it with Readmore.js, an extremely lightweight jQuery plugin for collapsing and expanding large and long blocks of text with "Read More" and "Close' links.

 

Designers can control the speed (how quickly the text appears - in milliseconds) as well as the displayed height. If elements have a max-height CSS property, the Readmore.js plugin will use that value instead of the value of the maxHeight option.