1
我试图让使用jQuery移动应用程序。我正在使用做一个滑动面板,我有它的来源。源代码是.html .css和.js,html和css似乎可以工作,但.js不能。任何答案?jQuery Mobile的加载错误
它想成这样this
也是它在我的本地Web服务器上。
源代码:
的.js
$(document).on("pageinit", "#demo-page", function() {
$(document).on("swipeleft swiperight", "#demo-page", function (e) {
// We check if there is no open panel on the page because otherwise
// a swipe to close the left panel would also open the right panel (and v.v.).
// We do this by checking the data that the framework stores on the page element (panel: open).
if ($.mobile.activePage.jqmData("panel") !== "open") {
if (e.type === "swipeleft") {
$("#right-panel").panel("open");
}
else if (e.type === "swiperight") {
$("#left-panel").panel("open");
}
}
});
});
你加入上面的脚本前的jquery库的? – Braders
什么库? –
假设你的意思是jquery.mobile.custom.js库 –