我正在开发一个 jquery 移动 webapp
基本结构需要 jqueryMobile 文档中记录的 jquery.js 和 jquery-mobile.js 广告。
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="myjqueryconfig.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
</head>
一切都适用于这种结构,但我想将 jquery js 文件与 jquery-mobile js 文件合并以拥有一个 js 文件但是当我这样做时(只需将 jquery 移动代码剪切并推送到 jquery 文件的末尾)页面停止工作和萤火虫给我一个javascript错误:
TypeError: $(...).bind(...) is not a function
我的单个 .js 文件的结构如下:
//jquery 1.9.1 min source code
$(document).bind("mobileinit", function(){
$.mobile.autoInitializePage = false
})
//jquery mobile min 1.3.0 source code