{"id":4248,"date":"2015-10-25T22:37:31","date_gmt":"2015-10-25T14:37:31","guid":{"rendered":"https:\/\/sdeno.com\/?p=4248"},"modified":"2015-10-25T22:40:03","modified_gmt":"2015-10-25T14:40:03","slug":"%e6%89%8b%e6%9c%ba%e4%b8%8a%e6%8b%89%e5%88%b0%e9%a1%b6%e9%83%a8%e5%88%b7%e6%96%b0%e5%8a%a0%e8%bd%bd%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=4248","title":{"rendered":"\u624b\u673a\u4e0a\u62c9\u5230\u9876\u90e8\u5237\u65b0\u52a0\u8f7d\u6548\u679c"},"content":{"rendered":"<p>\u4f7f\u7528\u65b9\u6cd5<\/p>\n<pre>&lt;link rel=\"stylesheet\" href=\"..\/dist\/dropload.min.css\"&gt;\r\n&lt;script src=\"..\/dist\/dropload.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<pre style=\"color: #333333;\"><code>$('.element').dropload({\r\n    scrollArea : window,\r\n    loadDownFn : function(me){\r\n        $.ajax({\r\n            type: 'GET',\r\n            url: 'json\/more.json',\r\n            dataType: 'json',\r\n            success: function(data){\r\n                alert(data);\r\n                \/\/ \u4ee3\u7801\u6267\u884c\u540e\u5fc5\u987b\u91cd\u7f6e\r\n                me.resetload();\r\n            },\r\n            error: function(xhr, type){\r\n                alert('Ajax error!');\r\n                me.resetload();\r\n            }\r\n        });\r\n    }\r\n});<\/code><\/pre>\n<table style=\"color: #333333;\">\n<thead>\n<tr>\n<th style=\"font-weight: bold;\">\u53c2\u6570<\/th>\n<th style=\"font-weight: bold;\">\u8bf4\u660e<\/th>\n<th style=\"font-weight: bold;\">\u9ed8\u8ba4\u503c<\/th>\n<th style=\"font-weight: bold;\">\u53ef\u586b\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>scrollArea<\/td>\n<td>\u6ed1\u52a8\u533a\u57df<\/td>\n<td>\u7ed1\u5b9a\u5143\u7d20\u81ea\u8eab<\/td>\n<td>window<\/td>\n<\/tr>\n<tr>\n<td>domUp<\/td>\n<td>\u4e0a\u65b9DOM<\/td>\n<td>{<br \/>\ndomClass : &#8216;dropload-up&#8217;,<br \/>\ndomRefresh : &#8216;&lt;div class=&#8221;dropload-refresh&#8221;&gt;\u2193\u4e0b\u62c9\u5237\u65b0&lt;\/div&gt;&#8217;,<br \/>\ndomUpdate : &#8216;&lt;div class=&#8221;dropload-update&#8221;&gt;\u2191\u91ca\u653e\u66f4\u65b0&lt;\/div&gt;&#8217;,<br \/>\ndomLoad : &#8216;&lt;div class=&#8221;dropload-load&#8221;&gt;\u25cb\u52a0\u8f7d\u4e2d&#8230;&lt;\/div&gt;&#8217;<br \/>\n}<\/td>\n<td>\u6570\u7ec4<\/td>\n<\/tr>\n<tr>\n<td>domDown<\/td>\n<td>\u4e0b\u65b9DOM<\/td>\n<td>{<br \/>\ndomClass : &#8216;dropload-down&#8217;,<br \/>\ndomRefresh : &#8216;&lt;div class=&#8221;dropload-refresh&#8221;&gt;\u2191\u4e0a\u62c9\u52a0\u8f7d\u66f4\u591a&lt;\/div&gt;&#8217;,<br \/>\ndomUpdate : &#8216;&lt;div class=&#8221;dropload-update&#8221;&gt;\u2193\u91ca\u653e\u52a0\u8f7d&lt;\/div&gt;&#8217;,<br \/>\ndomLoad : &#8216;&lt;div class=&#8221;dropload-load&#8221;&gt;\u25cb\u52a0\u8f7d\u4e2d&#8230;&lt;\/div&gt;&#8217;<br \/>\n}<\/td>\n<td>\u6570\u7ec4<\/td>\n<\/tr>\n<tr>\n<td>distance<\/td>\n<td>\u62c9\u52a8\u8ddd\u79bb<\/td>\n<td>50<\/td>\n<td>\u6570\u5b57<\/td>\n<\/tr>\n<tr>\n<td>loadUpFn<\/td>\n<td>\u4e0a\u65b9function<\/td>\n<td>\u7a7a<\/td>\n<td>function(me){<br \/>\n\/\/\u4f60\u7684\u4ee3\u7801<br \/>\nme.resetload();<br \/>\n}<\/td>\n<\/tr>\n<tr>\n<td>loadDownFn<\/td>\n<td>\u4e0b\u65b9function<\/td>\n<td>\u7a7a<\/td>\n<td>function(me){<br \/>\n\/\/\u4f60\u7684\u4ee3\u7801<br \/>\nme.resetload();<br \/>\n}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-weight: bold; color: #333333;\">API<\/h2>\n<p style=\"color: #333333;\">\u66b4\u9732\u4e00\u4e9b\u529f\u80fd\uff0c\u53ef\u4ee5\u8ba9dropload\u66f4\u7075\u6d3b\u7684\u4f7f\u7528<\/p>\n<p style=\"color: #333333;\"><code>lock()<\/code>\u00a0\u9501\u5b9adropload<\/p>\n<p style=\"color: #333333;\"><code>unlock()<\/code>\u00a0\u89e3\u9501dropload<\/p>\n<p style=\"color: #333333;\">\u6e90\u6587\u4ef6\u4e0b\u8f7d\uff1a<a href=\"http:\/\/pan.baidu.com\/s\/1sjzMu\" target=\"_blank\">http:\/\/pan.baidu.com\/s\/1sjzMu<\/a><\/p>\n<p style=\"color: #333333;\">\u7c7b\u4f3c\u529f\u80fd\u5982\uff1a<a href=\"https:\/\/sdeno.com\/?p=4245\" target=\"_blank\">Hook.js \u2013 \u5728\u4f20\u7edf\u7f51\u9875\u4e0a\u5b9e\u73b0\u624b\u673a\u4e2d\u7684\u4e0b\u62c9\u5237\u65b0\u6548\u679c<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/ximan\/dropload\" target=\"_blank\">https:\/\/github.com\/ximan\/dropload<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u65b9\u6cd5 &lt;link rel=&#8221;stylesheet&#8221; href=&#8221;..\/dist\/dropload.m [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-4248","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/4248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4248"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/4248\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}