{"id":3221,"date":"2014-11-06T16:07:01","date_gmt":"2014-11-06T08:07:01","guid":{"rendered":"https:\/\/sdeno.com\/?p=3221"},"modified":"2015-05-01T23:23:39","modified_gmt":"2015-05-01T15:23:39","slug":"swipe-js%e6%89%8b%e6%9c%ba%e7%a7%bb%e5%8a%a8%e7%ab%af%e6%bb%91%e5%8a%a8%e6%8f%92%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=3221","title":{"rendered":"swipe.js\u624b\u673a\u79fb\u52a8\u7aef\u6ed1\u52a8\u63d2\u4ef6\u652f\u6301\u4e0a\u4e0b\u5de6\u53f3\u6ed1\u52a8"},"content":{"rendered":"<p>\u5173\u952e\u8bcd\uff1a\u624b\u673a\u5e7b\u706f\u7247 \u624b\u673a \u624b\u52bf \u4e0a\u4e0b\u5de6\u53f3 \u6ed1\u52a8<\/p>\n<p>\u517c\u5bb9IE8\u4ee5\u4e0a<\/p>\n<p>swipe.js\u662f\u4e00\u4e2a\u6bd4\u8f83\u6709\u540d\u7684\u89e6\u6478\u6ed1\u52a8\u63d2\u4ef6\uff0c\u5b83\u80fd\u591f\u5904\u7406\u5185\u5bb9\u6ed1\u52a8\uff0c\u652f\u6301\u81ea\u5b9a\u4e49\u9009\u9879\uff0c\u4f60\u53ef\u4ee5\u8ba9\u5b83\u81ea\u52a8\u6eda\u52a8\uff0c\u63a7\u5236\u6eda\u52a8\u95f4\u9694\uff0c\u8fd4\u56de\u56de\u8c03\u51fd\u6570\u7b49\u3002\u7ecf\u5e38\u53ef\u89c1\u4f7f\u7528\u5728\u79fb\u52a8\u524d\u7aef\u5f00\u53d1\u4e2d\u3002<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u6bd4\u8f83\u7b80\u5355\u7684\u4f7f\u7528\u4f8b\u5b50\uff0c\u6dfb\u52a0\u9002\u5f53\u7684HTML\u4ee3\u7801\u548cjs\u4ee3\u7801\u5373\u53ef\u3002<\/p>\n<pre style=\"color: #333333;\">&lt;div id='slider' class='swipe'&gt;\r\n  &lt;div class='swipe-wrap'&gt;\r\n    &lt;div&gt;&lt;\/div&gt;\r\n    &lt;div&gt;&lt;\/div&gt;\r\n    &lt;div&gt;&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<pre style=\"color: #333333;\">window.mySwipe = Swipe(document.getElementById('slider'));<\/pre>\n<pre style=\"color: #333333;\">.swipe {\r\n  overflow: hidden;\r\n  visibility: hidden;\r\n  position: relative;\r\n}\r\n.swipe-wrap {\r\n  overflow: hidden;\r\n  position: relative;\r\n}\r\n.swipe-wrap &gt; div {\r\n  float:left;\r\n  width:100%;\r\n  position: relative;\r\n}<\/pre>\n<h3 class=\"title-2\" style=\"color: #6b6b6b;\">\u8bbe\u7f6e\u9009\u9879<\/h3>\n<ul style=\"color: #6b6b6b;\">\n<li><span style=\"font-weight: bold;\">startSlide<\/span>\u00a0Integer\u00a0<em>(default:0)<\/em>\u00a0&#8211; \u5f00\u59cb\u6eda\u52a8\u7684\u4f4d\u7f6e<\/li>\n<li><span style=\"font-weight: bold;\">speed<\/span>\u00a0Integer\u00a0<em>(default:300)<\/em>\u00a0&#8211; \u52a8\u753b\u6eda\u52a8\u7684\u95f4\u9694\uff08\u79d2\u6570\uff09<\/li>\n<li><span style=\"font-weight: bold;\">auto<\/span>\u00a0Integer &#8211;\u00a0\u5f00\u59cb\u81ea\u52a8\u5e7b\u706f\u7247\uff08\u4ee5\u6beb\u79d2\u4e3a\u5355\u4f4d\u5e7b\u706f\u7247\u4e4b\u95f4\u7684\u65f6\u95f4\uff09<\/li>\n<li><span style=\"font-weight: bold;\">continuous<\/span>\u00a0Boolean\u00a0<em>(default:true)<\/em>\u00a0&#8211; \u521b\u5efa\u4e00\u4e2a\u65e0\u9650\u7684\u5faa\u73af\uff08\u5f53\u6ed1\u52a8\u5230\u6240\u6709\u52a8\u753b\u7ed3\u675f\u65f6\u662f\u5426\u5faa\u73af\u6ed1\u52a8\uff09<\/li>\n<li><span style=\"font-weight: bold;\">disableScroll<\/span>\u00a0Boolean\u00a0<em>(default:false)<\/em>\u00a0&#8211; \u5f53\u6eda\u52a8\u6eda\u52a8\u6761\u65f6\u662f\u5426\u505c\u6b62\u5e7b\u706f\u7247\u6eda\u52a8<\/li>\n<li><span style=\"font-weight: bold;\">stopPropagation<\/span>\u00a0Boolean\u00a0<em>(default:false)<\/em>\u00a0&#8211; \u662f\u5426\u505c\u6b62\u4e8b\u4ef6\u5192\u6ce1<\/li>\n<li><span style=\"font-weight: bold;\">callback<\/span>\u00a0Function &#8211; \u5e7b\u706f\u7247\u8fd0\u884c\u4e2d\u7684\u56de\u8c03\u51fd\u6570<\/li>\n<li><span style=\"font-weight: bold;\">transitionEnd<\/span>\u00a0Function &#8211; \u52a8\u753b\u8fd0\u884c\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570<\/li>\n<\/ul>\n<h3 class=\"title-3\" style=\"color: #6b6b6b;\">\u5b9e\u4f8b<\/h3>\n<pre style=\"color: #333333;\">window.mySwipe = new Swipe(document.getElementById('slider'), {\r\n  startSlide: 2,\r\n  speed: 400,\r\n  auto: 3000,\r\n  continuous: true,\r\n  disableScroll: false,\r\n  stopPropagation: false,\r\n  callback: function(index, elem) {},\r\n  transitionEnd: function(index, elem) {}\r\n});<\/pre>\n<h3 class=\"title-4\" style=\"color: #6b6b6b;\"><a style=\"color: #2a6496;\" rel=\"nofollow\" name=\"title-4\"><\/a>\u6ce8\u610f<\/h3>\n<p style=\"color: #6b6b6b;\">1\u3001\u539f\u59cb\u7684Swipe JS\uff0c\u5f53\u4f60\u7528\u70b9\u51fb\u6216\u8005\u624b\u52bf\u63a7\u5236\u4e86\u4e4b\u540e\uff0c\u8f6e\u64ad\u56fe\u5c31\u4e0d\u4f1a\u81ea\u52a8\u6eda\u52a8\u4e86\uff0c\u76ee\u524dsina.cn\u7f51\u9875\u4e5f\u662f\u8fd9\u4e2a\u8bbe\u8ba1\u903b\u8f91\uff0c\u4f46\u662f\u6709\u4e9b\u5ba2\u6237\u4e0d\u7ed9\u4ed6\u81ea\u52a8\u6eda\u52a8\u5fc3\u7406\u5c31\u4e0d\u8212\u670d\uff0c\u89e3\u51b3\u529e\u6cd5\u662f\u4fee\u6539\u539fswipe.js\u7684stop\u51fd\u6570\u5982\u4e0b\uff1a<\/p>\n<pre style=\"color: #333333;\">function stop() {\r\n    \/\/delay = 0;\r\n    delay = options.auto &gt; 0 ? options.auto : 0;\r\n    clearTimeout(interval);\r\n  }<\/pre>\n<p><a href=\"https:\/\/sdeno.com\/wp-content\/uploads\/2014\/11\/mobile_slide.rar\">mobile_slide<\/a><\/p>\n<p><a href=\"https:\/\/sdeno.com\/wp-content\/uploads\/2014\/11\/mobile_slide2.rar\">mobile_slide2<\/a><br \/>\n\u6f14\u793a\u5730\u57401\uff1a<a href=\"https:\/\/sdeno.com\/zp\/mobile_slide\/\" target=\"_blank\">https:\/\/sdeno.com\/zp\/mobile_slide\/<\/a><br \/>\n\u6f14\u793a\u5730\u57402\uff1a<a href=\"https:\/\/sdeno.com\/zp\/mobile_slide2\/\" target=\"_blank\">https:\/\/sdeno.com\/zp\/mobile_slide2\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u952e\u8bcd\uff1a\u624b\u673a\u5e7b\u706f\u7247 \u624b\u673a \u624b\u52bf \u4e0a\u4e0b\u5de6\u53f3 \u6ed1\u52a8 \u517c\u5bb9IE8\u4ee5\u4e0a swipe.js\u662f\u4e00\u4e2a\u6bd4\u8f83\u6709\u540d\u7684\u89e6\u6478\u6ed1\u52a8\u63d2\u4ef6\uff0c [&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-3221","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/3221","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=3221"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/3221\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}