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庫 –