利用jquery.more.js滚动实现更多加载

js部分代码

<div  id= "vlist" class="bus94 m-0-auto" >
     <ul  class = "busbox ft12" >
         <li  class = "headh2" >消费确认码:<span  class = "checkcode" ></span></li>
         <li  class = "headh2" >电 子 串 码:<span  class = "password" ></span></li>
         <li  class = "headh2" >商 品 名 称:<span  class = "productname" ></span></li>
         <li  class = "headh2" >商 品 价 格:¥<span  class = "price" ></span></li>
         <li  class = "headh2" >验 证 时 间:<span  class = "checktime" ></span></li>
     </ul>
     <div id= "get_more"  class = "txtcent button ft12" >更多</div>
</div>

<script type=text/javascript src= "{STATICURL}js/mobile/jquery.more.js" ></script>
<script type= "text/javascript" >
     jQuery( function () {
         jQuery( '#vlist' ).more({
             "url" 'portal.php?mod=ajax&do=mvoucher' ,//后台访问路径
             "data" :{ "int" : "{$int}" },//传递的数据
             "template" ".busbox" ,
             "trigger" "#get_more",
            "scroll":"true",
            "offset":"100"

         });
     });
</script>
/**
  * 调用参数,方法如:$('#more').more({'url': 'data.php'});
  * amount  :'10'           每次显示记录数
  * url :'comments.php'     请求后台的地址
  * data:{},                自定义参数
  * template:'.single_item' html记录DIV的class属性
  * trigger :'#get_more'    触发加载更多记录的class属性
  * scroll  :'false'        是否支持滚动触发加载
  * offset  :'100'          滚动触发加载时的偏移量
  */


猜你喜欢

转载自blog.csdn.net/xly1993/article/details/79351365