Skip to content

simplesessions/succinct

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 Live Demo: http://micjamking.github.io/succinct/

##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

    • Succinct is < 0.5kb minified
  • You'll need a copy of jQuery to run this plugin
  • If you have any suggestions, comments, or creative insults for my code, add an issue or fork the repo.

###Copyright MIT license Copyright (c) 2013 Mike King (@micjamking)

About

A tiny jQuery plugin for truncating multiple lines of text

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%