kodama1 / text-control

Fast way to substring your texts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Substring your texts easy and fast.

Usage

Just include text-control.js after jQuery. Requires jQuery 1.4+.

It is also available via bower.

$ bower install --save text-control

HTML

<script src='jquery.js'></script>
<script src='text-control.js'></script>

Javascript

$('.foo').texControl();

To make the script run when the page load, you need to put the "shiny" inside a load, ready function or in the end of the , like this:

$(document).ready(function(){
	$('.foo').textControl();
})

Settings

$('.foo').textControl({
	limit: 26
});

You can set the character limit! Easy and done.

Feedback

If this plugin was usefull to you, please send me a tweet (@marcuscaum)! We are open to receive any ideas to make this plugin better every day.

About

Fast way to substring your texts