Skip to content

Instantly share code, notes, and snippets.

@jonathanstark
Last active December 28, 2015 20:29
Show Gist options
  • Save jonathanstark/7557823 to your computer and use it in GitHub Desktop.
Save jonathanstark/7557823 to your computer and use it in GitHub Desktop.
TechCrunchblog post: readmorify
// Initialize any "read more" elements
$('.press-release').readmorify({
buttons: {
more: '<p class="align-center text-btn read-more"><a href="#">Read more</a></p>',
less: '<p class="align-center text-btn read-less"><a href="#">Read less</a></p>'
},
threshold: 280,
duration: 1000 // milliseconds
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment