{"id":2173,"date":"2018-12-19T10:26:02","date_gmt":"2018-12-19T02:26:02","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=2173"},"modified":"2018-12-19T10:27:00","modified_gmt":"2018-12-19T02:27:00","slug":"%e7%bb%87%e6%a2%a6dedecms%e7%82%b9%e5%87%bb%e5%8a%a0%e8%bd%bd%e6%9b%b4%e5%a4%9a%e6%97%a0%e9%99%90%e4%b8%8b%e6%8b%89infinite-ajax-scroll%e6%8f%92%e4%bb%b6%e6%94%af%e6%8c%81%e5%8a%a8%e9%9d%99","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/2173.html","title":{"rendered":"\u7ec7\u68a6DEDECMS”\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a””\u65e0\u9650\u4e0b\u62c9”Infinite Ajax Scroll\u63d2\u4ef6,\u652f\u6301\u52a8\u9759\u6001,\u652f\u6301\u56fe\u7247\u5ef6\u8fdf\u52a0\u8f7d"},"content":{"rendered":"

\u7ec7\u68a6DEDECMS\"\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a\"\"\u65e0\u9650\u4e0b\u62c9\"Infinite Ajax Scroll\u63d2\u4ef6,\u652f\u6301\u52a8\u9759\u6001,\u652f\u6301\u56fe\u7247\u5ef6\u8fdf\u52a0\u8f7d\uff0cInfinite Ajax Scroll \u7b80\u79f0\u00a0ias<\/u>\uff0c\u65e0\u9650\u7684ajax\u6eda\u52a8\uff0c\u662f\u4e00\u6b3ejQuery\u6eda\u52a8ajax\u5206\u9875\u63d2\u4ef6\uff0c\u5f53\u9875\u9762\u6eda\u52a8\u5230\u5bb9\u5668\u53ef\u89c1\u90e8\u5206\u5c06\u81ea\u52a8\u5f02\u6b65\u52a0\u8f7d\u6570\u636e\u3002<\/p>\n

\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a\u6548\u679c<\/h2>\n

\"\"<\/a><\/p>\n

\u65e0\u9650\u4e0b\u62c9\u6548\u679c<\/h2>\n

\"\"<\/a><\/p>\n

\u4f7f\u7528\u65b9\u6cd5\uff1a<\/h2>\n

\u4e00\u3001\u9875\u9762\u4e2d\u5f15\u7528jquery.js \u4e0e jquery-ias.min.js\uff0c\u6ce8\u610f\uff1ajquery.js\u5e93\u7248\u672c\u5fc5\u987b\u5927\u4e8e1.6 \uff0c<\/span>jquery.js\u00a0\u5e93\u4e00\u822c\u9875\u9762\u90fd\u6709\u8c03\u7528\uff0c\u6211\u8fd9\u8fb9\u5c31\u4e0d\u63d0\u4f9b\u4e0b\u8f7d\u4e86\u3002\u53ea\u63d0\u4f9bjquery-ias.min.js\u4e0b\u8f7d\u3002<\/p>\n\n\n\t\"Placeholder\"\n\t\u4e0b\u8f7d1010<\/div>\n\n\t\n\n\t\t

jquery-ias.min<\/h1>\n\n\t\t\t\t\t\t\n\t\t\t\u4e0b\u8f7d\u6587\u4ef6\t\t\tjquery-ias.min_.zip\t\t\t\t– 6.02 KB<\/small>\n\t\t<\/a>\n\t\t\t<\/div>\n<\/aside>\n\n\n\n
<script src='\/js\/jquery.js'><\/script>\r\n<script src=\"\/js\/jquery-ias.min.js\"><\/script><\/code><\/pre>\n

\u4e8c\u3001\u63a5\u7740\u4e0a\u9762\u7684js\uff0c\u5728\u9875\u9762\u4e2d\u5199\u5165\u63d2\u4ef6\u53c2\u6570<\/p>\n

<script type=\"text\/javascript\">\r\nvar ias = $.ias({\r\n    container: \".listbox<\/span>\", \/\/\u5305\u542b\u6240\u6709\u6587\u7ae0\u7684\u5143\u7d20\r\n    item: \".item<\/span>\", \/\/\u6587\u7ae0\u5143\u7d20\r\n    pagination: \".pagelist<\/span>\", \/\/\u5206\u9875\u5143\u7d20\r\n    next: \".pagelist a.nextpage<\/span>\", \/\/\u4e0b\u4e00\u9875\u5143\u7d20\r\n});\r\nias.extension(new IASSpinnerExtension({\r\n    src: \"\/img\/load.gif\", \/\/\u6b64\u9009\u9879\u4e3a\u52a0\u8f7d\u65f6\u7f13\u51b2\u56fe\u7247\r\n    html: '<p style=\"text-align: center;\"><img src=\"{src}\"\/><\/p>'\r\n}));\r\nias.extension(new IASTriggerExtension({\r\n    text: '\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a', \/\/\u6b64\u9009\u9879\u4e3a\u9700\u8981\u70b9\u51fb\u65f6\u7684\u6587\u5b57\r\n    html: '<p style=\"text-align: center; cursor: pointer;\"><a>{text}<\/a><\/p>',\r\n    offset: !1, \/\/\u8bbe\u7f6e\u6b64\u9879\uff0c\u5982 offset:2 \u9875\u4e4b\u540e\u9700\u8981\u624b\u52a8\u70b9\u51fb\u624d\u80fd\u52a0\u8f7d\uff0coffset:!1 \u5219\u4e00\u76f4\u4e3a\u65e0\u9650\u52a0\u8f7d\r\n}));\r\nias.extension(new IASNoneLeftExtension({\r\n    text: '\u522b\u518d\u62c9\u5566\uff0c\u6211\u4eec\u662f\u6709\u5e95\u7ebf\u7684\uff01', \/\/ \u52a0\u8f7d\u5b8c\u6210\u65f6\u7684\u63d0\u793a\r\n    html: '<p style=\"text-align: center; cursor: pointer;\"><a>{text}<\/a><\/p>',\r\n}));\r\n<\/script><\/code><\/pre>\n

\u4e09\u3001\u5217\u8868\u6a21\u677f\u8c03\u7528\u4ee3\u7801\u4ee3\u7801\uff0c\u6b64\u4ee3\u7801\u662f\u9ed8\u8ba4\u6a21\u677f\u7684\u4ee3\u7801\uff0c\u53ef\u6839\u636e\u81ea\u5df1\u7684\u4fee\u6539\u8c03\u7528\u53c2\u6570\uff0c\u6ce8\u610f\u6807\u8272\u7684\u5730\u65b9\u8981\u4e0e\u7b2c2\u6b65\u6807\u8272\u7684\u5730\u65b9\u7edf\u4e00<\/p>\n

<div class=\"listbox<\/span>\">\r\n<ul class=\"e2\">\r\n{dede:list pagesize='10'}\r\n<li class=\"item<\/span>\"><a href=\"[field:arcurl\/]\" class=\"title\">[field:title\/]<\/a><\/li>\r\n{\/dede:list}\r\n<\/ul>\r\n<\/div>\r\n<ul class=\"pagelist<\/span>\">\r\n{dede:pagelist listitem=\"next\" listsize=\"1\" runphp=yes}\r\n@me = preg_replace('\/<a\\shref=([\\'\"]?).+?\\1\/', '$0 class=\"nextpage<\/span>\"', @me);\r\n{\/dede:pagelist}\r\n<\/ul><\/code><\/pre>\n

\u8981\u5728\u52a0\u8f7d\u66f4\u591a\u540e\u663e\u793a\u7684\u6587\u7ae0\u4e2d\u652f\u6301\u56fe\u7247\u5ef6\u8fdf\u52a0\u8f7d\uff0c\u9700\u8981\u6dfb\u52a0\u6b64\u56fe\u7247\u5ef6\u8fdf\u52a0\u8f7d\u529f\u80fd\uff0c\u6ca1\u6709\u5ef6\u8fdf\u52a0\u8f7d\u56fe\u7247\u7684\u7ae5\u5b66\u4e0d\u9700\u8981\u7406\u4f1a\u3002<\/p>\n

ias.on('rendered', function(items) {\r\n    $(\".content img\").lazyload({\r\n        effect: \"fadeIn\",\r\n    failure_limit : 10\r\n    }); \/\/\u8fd9\u91cc\u662f\u4f60\u8c03\u7528Lazyload\u7684\u4ee3\u7801\r\n}) <\/code><\/pre>\n

 <\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u7ec7\u68a6DEDECMS\"\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a\"\"\u65e0\u9650\u4e0b\u62c9\"Infinite Ajax Scroll\u63d2\u4ef6,\u652f\u6301\u52a8\u9759\u6001,\u652f\u6301\u56fe […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[734,737,732,735,736,733],"class_list":["post-2173","post","type-post","status-publish","format-standard","hentry","category-web","tag-infinite-ajax-scroll","tag-737","tag-732","tag-735","tag-736","tag-733"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/2173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=2173"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/2173\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=2173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=2173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=2173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}