项目作者: nttps

项目描述 :
jQuery button click load more elements
高级语言: HTML
项目地址: git://github.com/nttps/js-loadmore.git
创建时间: 2019-02-28T07:51:54Z
项目社区:https://github.com/nttps/js-loadmore

开源协议:MIT License

下载


js Function Button Load more..

StyleCI

JS Button Load more

Including files:

  1. <script src="../dist/btnloadmore.min.js"></script>

How to use

You need to do is call the plugin inside a $(document).ready function:

  1. <div class="contents">
  2. <div> 1 </div>
  3. <div> 2 </div>
  4. <div> 3 </div>
  5. <div> 4 </div>
  6. <div> 5 </div>
  7. <div> 6 </div>
  8. <div> 7 </div>
  9. <div> 8 </div>
  10. <div> 9 </div>
  11. </div>
  1. $(document).ready(function(){
  2. $('.contents').btnLoadmore();
  3. });

Options

  1. $('.contents').btnLoadmore({
  2. showItem : 2,
  3. whenClickBtn : 1,
  4. textBtn : 'Load more ...'
  5. });

Method

  • showItem : set number for show element.
  • whenClickBtn : set number for show element when click button.
  • textBtn : set text on click button.
  • classBtn : set custom class button .