Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.
/ jquery-px-readmore Public archive

jQuery plugin for collapsing and expanding long blocks of content with "Read more" and "Read less" buttons.

Notifications You must be signed in to change notification settings

taunoha/jquery-px-readmore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery-px-readmore

Just another jQuery Readmore plugin for collapsing and expanding long blocks of text with "Read more" and "Read less" buttons. It's a drop-in solution you can probably use with your existing HTML. There's no need for complicated sets of div's or smth smth. You can use this plugin purely through the markup API without writing a single line of JavaScript.

How to use?

<article data-readmore-max-height="200" data-readmore="Read more" data-readmore-less="Read less">
...
</article>

Events

$(document).on('closed.px.readmore', function(e) {
  var $this = $(e.relatedTarget); // Toggle button element
});

$(document).on('open.px.readmore', function(e) {
  var $this = $(e.relatedTarget); // Toggle button element
});

About

jQuery plugin for collapsing and expanding long blocks of content with "Read more" and "Read less" buttons.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages