jQuery Plugin To Truncate Long Text By Height readMoreFade - Download jQuery Plugin To Truncate Long Text By Height - readMoreFade

Download jQuery Plugin To Truncate Long Text By Height – readMoreFade

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Truncate Long Text By Height – readMoreFade, hope it will help you in programming stack.

jQuery Plugin To Truncate Long Text By Height readMoreFade - Download jQuery Plugin To Truncate Long Text By Height - readMoreFade
File Size: 3.7 KB
Views Total: 2928
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

readMoreFade is a jQuery plugin for creating collapsible and expandable content where the text fades out at the bottom and has a “Read More” button.

How to use it:

1. Wrap your long text into a DIV container as this:

1 <div id="fadeMe">
2   <p>
3     Content here ...
4   </p>
5 </div>

2. Place jQuery library and the jQuery readMoreFade plugin at the bottom of the webpage.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="readMoreFade.js"></script>

3. Active the plugin on the text container.

1 $('#fadeMe').readMoreFade();

4. The required CSS styles for the text fade effect.

01 .readMoreFade {
02   background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(255,0,0,0)), color-stop(1, rgba(255,0,0,100)));
03   position: absolute;
04   bottom: 0;
05   left: 0;
06   width: 100%;
07   text-align: center;
08   margin: 0;
09   padding: 30px 0 30px 0;
10 }

This awesome jQuery plugin is developed by xmarkclx. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net