SkillAgentSearch skills...

JQuery.readMore

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

Install / Use

/learn @s-a/JQuery.readMore
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

jQuery.readMore

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.

<div class="test__box vertCentered">
	Vertically Centered Text
</div>
<div class="test__box centeredMultiLine">
	"Centered<br>
      Multiline<br>
      Text"
</div>
$('.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!

View on GitHub
GitHub Stars30
CategoryProduct
Updated6y ago
Forks1

Languages

JavaScript

Security Score

60/100

Audited on Jan 16, 2020

No findings