jQuery mobile報錯 Uncaught TypeError: Cannot read property 'concat' of undefined


寫一個jQuery mobile的demo

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
    </head>
    <body>
        <div data-role="page">
            <div data-role="header">頁眉</div>
            <div data-role="content">內容</div>
            <div data-role="footer">頁腳</div>
        </div>
        <script src="js/jquery.min.js"></script>
        <script src="js/jquery.mobile-1.4.5.js"></script>
    </body>
</html>

用瀏覽器打開,發現沒有樣式,打開控制台發現報了一個錯誤

上Stack Overflow查了一下,是因為jQuery mobile和jQuery的版本不匹配,我當前的jQuery mobile的版本是1.4.5,jQuery的版本3.2.1, jQuery重新下2版本以下的試試,我下了1.9.1是可行的

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM