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

寫一個jQuery mobile的democss

<!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>

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

上Stack Overflow查了一下,是由於jQuery mobile和jQuery的版本不匹配,我當前的jQuery mobile的版本是1.4.5,jQuery的版本3.2.1, jQuery從新下2版本如下的試試,我下了1.9.1是可行的jquery

相關文章
相關標籤/搜索