jQuery Plugin For Collapsible Html List showmore js - Download jQuery Plugin For Collapsible Html List - showmore.js

Download jQuery Plugin For Collapsible Html List – showmore.js

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Collapsible Html List – showmore.js, hope it will help you in programming stack.

jQuery Plugin For Collapsible Html List showmore js - Download jQuery Plugin For Collapsible Html List - showmore.js
File Size: 3.72 KB
Views Total: 2497
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

showmore.js is a jQuery plugin which truncates your multi-line content into a collapsible list with ‘Show more’ and ‘Show less’ links.

How to use it:

1. First you need to load jQuery library and the jQuery showmore.js plugin before the closing body tag.

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

2. Call the showmore function on the html list and specify how many items to be shown.

1 $(".ul").showmore({
2   visible:10
3 });

3. You can also apply the plugin to any html element like divs.

1 $(".div").showmore({
2   childElement:"div"
3 });

4. Customize the ‘Show more’ and ‘Show less’ links.

1 $(".div").showmore({
2   childElement:"div",
3   showMoreText : "<span>+ Show more</span>",
4   showLessText : "<span>- Show less</span>",
5   showMoreClass : "show_more",
6   showLessClass : "show_less"
7 });

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

source : jqueryscript.net