Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jtextshorten

jtextshorten is a simple text truncation plugin. jtextshorten will prevent text spilling over when applied to a large block of text. jtextshorten can be used with best in place and can be applied to block of text which is wrapped by best in place.

Live demo!

Usage

Default Settings

$('.jt-default').shortened();

By default, jtextshorten will truncate after 300 characters and add See more and See less links after truncation.

Custom Settings

$('.jt-limitchar').shortened({limitChars: 100});

In the example above, the character limit is overwritten from 300 to 100 and truncation is applied after it. You may change the settings at any time by passing an object to shortened.

Settings

  • limitChars (Default: 300) The number of characters to be displayed before truncating.
  • moreText (Default: See more) The string value to be displayed for view more link.
  • lessText (Default: See less) The string value to be displayed for view less link.

About

To see more content or less content

Resources

Stars

1 star

Watchers

11 watching

Forks

Releases

Packages

Contributors

Languages