最贊回答 / LEONE0
首先,通過 html 中的 `var swipe = Swipe($("#content"));` 獲得 js 中返回的 `return swipe;` swipe 對(duì)象,并將其賦值給 html 中定義的 swipe 變量;其次,通過 `swipe.scrollTo($("#content").width * 2, 5000);` 調(diào)用 js 中的 swipe 對(duì)象的 scrollTo 方法,并將該方法返回。
2015-08-13
44行 var $elem 是什么意思???我用jquery時(shí)只用過 $(選擇內(nèi)容),這個(gè) var $elem 是干嘛的???
2015-08-12