Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/s-a/jquery.readmore

Adds a read more link to an HTML element respecting it height and width
https://github.com/s-a/jquery.readmore

Last synced: about 5 hours ago
JSON representation

Adds a read more link to an HTML element respecting it height and width

Awesome Lists containing this project

README

        

jQuery.readMore
=================

[![Donate](http://s-a.github.io/donate/donate.svg)](http://s-a.github.io/donate/)

jQuery.readMore adds a read more link to HTML elements that will overflow regarding its content. The plugin respects existing CSS and fits within the box it is placed, regardless of padding, line-height, font-face, or letter-spacing. This is an alternative to CSS rule "text-overflow: ellipsis". With jQuery.readMore it is possible to create custom read more links and display cool excerpts.

```html


Vertically Centered Text


"Centered

Multiline

Text"

```

```js
$('.test__box').readMore({
title:'Read more',
text:'...',
href:function () {
return '#'+$(this).index();
}
});
```

Project home, documentation, live demos etc.:
----------
http://saquery.com/jquery-readmore/ ‎

Forks and Pull Requests
----------
Bug fixes and tweaks are very welcome!