Skip to content

Latest commit

 

History

History
executable file
·
76 lines (54 loc) · 1.62 KB

README.md

File metadata and controls

executable file
·
76 lines (54 loc) · 1.62 KB

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.