项目作者: krisdigital

项目描述 :
Minimal responsive jQuery readmore JS with CSS transitions where possible
高级语言: CoffeeScript
项目地址: git://github.com/krisdigital/readmore-light-js.git
创建时间: 2016-06-09T12:50:03Z
项目社区:https://github.com/krisdigital/readmore-light-js

开源协议:MIT License

下载


readmore-light-js

Minimal responsive jQuery readmore JS with CSS transitions where possible, use it as it or as a starting point.

It works in production, is tiny and you can check it out here!

Usage

HTML

  1. <div class="faded-read-more read-more-c">
  2. <div class="read-more">
  3. Your text is much too long, bro, you should totally shorten it!
  4. </div>
  5. </div>

JS

  1. $('.read-more').each ->
  2. new ReadmoreLight($(this), {
  3. moreTemplate: $('#more-link-template').html()
  4. lessTemplate: false
  5. })