Skip to content

Commit b467837

Browse files
authored
Update README.md
1 parent 199a0ec commit b467837

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
11
# jquery-text-tailor
2-
2+
3+
this is jQuery plugin for handling text overflow.
4+
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
5+
6+
(function initPage($) {
7+
8+
textTailor.init({
9+
transform: '...',
10+
lines: 2
11+
});
12+
13+
}).apply(this, [jQuery]);
14+
15+
Also, You can give more option to each html element.
16+
17+
data-text-tailor='{"transform":"***","lines":"3"}'<br>
18+
data-text-tailor='{"transform":"☆☆☆","lines":"4"}'<br>
19+
data-text-tailor='{"transform":"♡♡♡","lines":"5"}'<br>
20+
data-text-tailor='{"transform":"...viewMore▷","lines":"3","href":"http://www.google.com"}'<br>
21+
data-text-tailor='{"transform":"...viewMore▷","lines":"3","href":"http://www.google.com","target":"_blank"}'
22+
23+
* Notice : this plugin do not response to window resize event.

0 commit comments

Comments
 (0)