Skip to content

CardboardMonsters/jquery-simple-truncate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

JQuery-Simple-Truncate

Need to truncate text after a number of lines?

For example:

This text will get truncated to
two lines. No seriously
anything that pushes it over
will get truncated

Using this:

$('div#some-elem').truncate(2);

Will give:

This text will get truncated to
two lines. No seriously…

Just want a single line?

$('.title').truncate();

Need to ensure a line constraint in a responsive design?

$('.title').truncate();
$(window).resize(function(){
    $('.title').truncate();
});

About

A simple way of truncating the textual content of elements to a specific number of lines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors