【jQuery】”Readmore”プラグイン。QuickReadmore

QuickReadmoreはテキストをクリックすると隠していた続きのテキストを読むことができるjQueryプラグイン。

Basic stuff

$("selector").readmore();

With options

$("selector").readmore({
more: "<a href='#'>Custom Read more</a>",
less: "<a href='#'>Custom Close</a>", 
toggleSpeed: "slow"
});

Example

<div class="paragraph">
The text i want to be displayed at first
<div class="more">
The text to toggle on click
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="quick-readmore.js"></script>
<script>
$(".paragraph").readmore({
more: "<a href='#'>Custom Read more</a>",
less: "<a href='#'>Custom Close</a>", 
toggleSpeed: "slow"
});
</script>

MIT

 
QuickReadmore

【jQuery】”Readmore”プラグイン。QuickReadmore

  • LATEST
  • RELATED
  • POPULAR