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.
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:
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.
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 ))); |
09 |
padding : 30px 0 30px 0 ; |
This awesome jQuery plugin is developed by xmarkclx. For more Advanced Usages, please check the demo page or visit the official website.