jQuery / Programmings / Technologies

jQuery Text Shortening Plugin – more less plugin

A text shortening plugin with help of css and jquery. Try it and modify as your need. It is my small attempt contribute open-source codes.

Find project on git hub. github url : https://github.com/safeer-in/more_less

How to Use:

<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery.more-less.min.js"></script>
<script>
$(document).ready(function(){
	$('.more_less_content').moreless();
});
</script>

Options

Example:

                    $('.more_less_content').moreless({
                        wordlimit	:	150,
                        lessText	:	"less",
                        moreText	:	"more",
                        limitChars	:	"..."
                    });
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s