Skip to content

niconoe-/jquery-ellipsis

 
 

Repository files navigation

jQuery ellipsis Build Status Coverage Status Dependency Status

Support multiple lines ellipsis

http://plugins.jquery.com/ellipsis/

Getting Started

Download the production version or the development version.

Usage

Fit one line

$('#target').ellipsis();

Fit on two lines in the case of two or more lines

$('#target').ellipsis({
    row: 2
});

Change ellipsis character

$('#target').ellipsis({
    row: 2,
    char: '**'
});

Only include full words (remove word fragments at the end)

$('#target').ellipsis({
    row: 2,
    onlyFullWords: true
});

Callback function

$('#target').ellipsis({
    callback: function() {
        console.log($(this).text());
    }
});

Ellipsis for middle position

$('#target').ellipsis({
    position: 'middle'
});

Ellipsis for tail position

$('#target').ellipsis({
    position: 'tail'
});

License

jquery-ellipsis is available under the terms of the MIT License.

About

Support multiple lines ellipsis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 92.6%
  • CSS 7.4%