; (function (jquery) { jquery.fn.loadmore = function (opt) { var curpage = opt.curpage; //console.log(curpage); var totalpage = opt.totalpage; var con = opt.con; var url = opt.url; if (totalpage == "undefined") totalpage = 0; //this.css("background", "#ffaa00"); var this_ = this; if (curpage >= totalpage) this_.hide(); else { //this.wrap("
"); //$.getscript("/js/laypage/laypage.js", function () { // laypage({ // cont: $('#page'), //容器。值支持id名、原生dom对象,jquery对象, // pages: totalpage, //总页数 // skip: false, //是否开启跳页 // curr: curpage, // skin: '#2eb04b', // formaturl: url, // groups: 10 //连续显示分页数 // }); //}); //return this; this_.show(); this.click(function () { curpage += 1; if (curpage >=totalpage) { this_.hide(); } { $.ajax({ url: url.replace("{page}", curpage), success: function (res) { $(con).append($(res).find(con).children()); $("#token").val($(res).find("#token").val()); } }); } }); } } })(jquery);