PrimeModule

Setup

Minimum use of javascript and flat structure make it easy to setup.

HTML

<div class="read-more js-read-more">
  <a href="#" class="read-more__trigger js-read-more-trigger>Read more</a>
  <div class="read-more__content js-read-more-content">
    ...content...
  </div>
</div>

JavaScript

$(.js-read-more).readMore();

Demo

Simple example of read-more plugin usage. Click the trigger to toggle content.

Read more
Nulla convallis fringilla mi, eu pretium dui dapibus vel. Cras at odio nibh. Fusce eget metus justo. Pellentesque non quam massa. Cras placerat cursus accumsan. Maecenas hendrerit nibh enim, ac dapibus felis facilisis eu. Curabitur sollicitudin purus in ultrices rutrum. Donec non sem volutpat, eleifend lorem non, egestas ante. Proin varius lorem mauris, id aliquet velit eleifend at. Suspendisse quis mi id ante aliquam sodales id sed diam. Suspendisse suscipit dolor sed ipsum suscipit sodales. Pellentesque vitae odio dapibus, malesuada massa at, luctus risus. Suspendisse maximus sodales turpis vehicula pulvinar. Pellentesque pretium mollis magna, ut rhoncus leo hendrerit quis.

Requirements

Read-more plugin is written with jQuery use. Please download and attach jQuery library before using this plugin.
Version 1.12 required or above. Visit jQuery official website.

License

The MIT License (MIT)

Copyright (c) 2016 PrimeModule

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.