Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/himasrafeek/truncateme
Jquery Plugin to truncate texts easily
https://github.com/himasrafeek/truncateme
html jquery jquery-plugin text truncate truncate-text
Last synced: about 1 month ago
JSON representation
Jquery Plugin to truncate texts easily
- Host: GitHub
- URL: https://github.com/himasrafeek/truncateme
- Owner: HimasRafeek
- License: mit
- Created: 2018-08-16T06:30:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T11:21:06.000Z (over 6 years ago)
- Last Synced: 2024-11-24T19:58:10.936Z (about 2 months ago)
- Topics: html, jquery, jquery-plugin, text, truncate, truncate-text
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# truncateMe
Jquery Plugin to truncate texts easily## Requirements
- Jquery## Usages
```html
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Lorem ipsum dolor sit amet consectetur adipisicing elit.
```## Js
```javascript
$.truncateMe();
```## Default options Applied / Option Available
```javascript
$.truncateMe({
elem: '.truncateMe', // Default - jQuery Selector
trimTo: 50, // Default - Words By Default
trimEach: null, // Default - attr for trim Individual [data-truncateme="5"]
add: '.....', // Default - after truncation (concat)
words: true // Default - Limit with words (Set to false to limit by Characters)
});
```## Basic Usage
```html
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta, repellendus odio excepturi sequi, libero voluptatem laboriosam maiores tenetur, accusantium dolor ipsa laborum? Quos adipisci doloremque tempora fugit quisquam deleniti sunt nobis libero modi rem vitae ad, earum ab assumenda. Autem qui numquam blanditiis odio eius tempore mollitia asperiores facere molestiae.
``````javascript
$.truncateMe({
trimTo: 10, // Words By Default
});
```## Version 1.5.0
More Features Added.