Skip to content

Files

Latest commit

b467837 · Nov 3, 2020

History

History
23 lines (16 loc) · 904 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 904 Bytes

jquery-text-tailor

this is jQuery plugin for handling text overflow. All you have to do is import files and add attribute named 'data-text-tailor' to each html elements and execute a javascript function. like below

    (function initPage($) {

        textTailor.init({
            transform: '...',
            lines: 2
        });

    }).apply(this, [jQuery]);

Also, You can give more option to each html element.

data-text-tailor='{"transform":"***","lines":"3"}'
data-text-tailor='{"transform":"☆☆☆","lines":"4"}'
data-text-tailor='{"transform":"♡♡♡","lines":"5"}'
data-text-tailor='{"transform":"...viewMore▷","lines":"3","href":"http://www.google.com"}'
data-text-tailor='{"transform":"...viewMore▷","lines":"3","href":"http://www.google.com","target":"_blank"}'

  • Notice : this plugin do not response to window resize event.