[英]In jQuery Mobile Website Is it ok to keep jQuery and jQuery Mobile library at bottom?
[英]jQuery $.mobile library is undefined
我已將 jQuery 和 jQuery mobile 鏈接到我的代碼。 我在控制台中收到此錯誤:
TypeError: $.mobile is undefined
我已經重新檢查了 URL,一切都正確,我已經更新了文件(jQuery、jQuery mobile),但問題仍然存在。 我已經將 jquery.js 放在 jquery.mobile.js 之前
這是我的代碼:
<script src="JS/jquery.js" type="text/javascript"></script>
<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>
<script src="JS/bootstrap.min.js" type="text/javascript"></script>
<script src="JS/code.js" type="text/javascript"></script>
它在文件的末尾。 code.js 的內容: http ://pastebin.com/3LTcxs9S
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js">
</script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-
1.3.1.min.js"></script>
通過替換您的代碼來嘗試此操作
注意* 放完所有jquery庫腳本后,最后放jquery mobile腳本,我確定它會工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.