html 代码 :
<div> <div id = "kppcl"> <div> <div> <div> <a href = '{#url_reset ("Activity/detail", "id _ {#$ item.id#}")#}'> <img src = "{#$ item.logo#}"/> </a> </div> href = '{#url_reset ("activity/detail", "id _ {#$ item.id#}")#}'> {#$ item.title#} </a> </div> <div> <Таблица Cell -Spacing = "0" CellPadding = "0"> <Tr> <T. <Td> {#$ item.start_date#}-{#$ item.end_date#} </td> </tr> <tr> <th> 地点 : </th> <td> {#$ item.area_name#} </td> </tr> </table> </div> <div> <div> <div> <div> <div> <div> <div> <div> href = '{#url_reset ("activity/detail", "id _ {#$ item.id#}")#}'> <img src = "{#$ item.logo#}"/> </a> </div> <div> <a href = '{#url_reset ("activity/detail", "id _ {#$ item.id#}")#}'> {#$ item.title#} </a> </div> <div> <Таблица Cell -Spacing = "0" CellPadding = "0"> <Tr> <T. <Td> {#$ item.start_date#}-{#$ item.end_date#} </td> </tr> <tr> <th> 地点 : </th> <td> {#$ item.area_name#} </td> </tr> </table> </div> <div> <div> <div> <div> <div> <div> <div> <div> href = '{#url_reset ("activity/detail", "id _ {#$ item.id#}")#}'> <img src = "{#$ item.logo#}"/> </a> </div> <div> <a href = '{#url_reset ("activity/detail", "id _ {#$ item.id#}")#}'> {#$ item.title#} </a> </div> <div> <Таблица Cell -Spacing = "0" CellPadding = "0"> <Tr> <T. <td>{#$item.start_date#}-{#$item.end_date#}</td> </tr> <tr> <th>地点:</th> <td>{#$item.area_name#}</td> </tr> </table> </div> </div> <div></div> </div> </div> <div id="page" style = "display: none"> <div> <b> 上一页 </b> <b> 1 </b> <a href = "? P = 2"> 2 </a> <a href = "? P = 2" Rel = "2"> 下一页 </a> </div> </div> </div>JS 代码
<script src = "/js/blocksit.min.js"> </script> <script language = "javascript" type = "text/javascript"> $ (window) .load (function () {$ ('#kppcl'). Blocksit ({numofcol: 3, offsetx: 5, uffsety: 5}); var current_p = 0; // 滚动 $ (window) .scroll (function () {// 当滚动到最底部以上 100 像素时 , 加载新内容 if ($ (document) .height () - $ (this) .scrolltop () - $ (this) .height () <100) {ajax_load_data ();}}); функция ajax_load_data () {var next_p = $ ('#page'). Найти ('. nextprev'). attr ('rel'); if (next_p && next_p! = current_p) {console.log ('nextpage ='+next_p); current_p = next_p; $ .ajax ({url: '{#url_reset ("request/front/ajax", "", "php")#}', data: {'act': 'ajax_forum', 'p': next_p}, datatype: 'json', type: 'post', beforesend: function: function: show_loading_body (); $ ('#page'). html (data.pages_str); }} </script>