Succinct


A *tiny jQuery plugin for truncating multiple lines of text.


How does it work?

Succinct shortens your text to a specified size, and then adds an ellipsis to the end.

Demo

I notice that you use plain, simple language, short words and brief sentences. That is the way to write English - it is the modern way and the best way. Stick to it; don't let fluff and flowers and verbosity creep in. When you catch an adjective, kill it. No, I don't mean utterly, but kill most of them - then the rest will be valuable. They weaken when they are close together. They give strength when they are wide apart. An adjective habit, or a wordy, diffuse, flowery habit, once fastened upon a person, is as hard to get. ~Mark Twain

Usage

Specify the elements that you would like to truncate as a selector, and then set the size parameter to the amount you would like to see.

For example, if you would like to truncate all elements with a specific class, ie. <p class="truncate"> to 120 characters...

<script>
  $(function(){
    $('.truncate').succinct({
      size: 120
    });
  });
</script>

By default, the plugin truncates text to 240 characters.

Details