Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.