2
我正在开发一个jQuery移动网络应用程序合并jQuery的1.9.1.min.js和query.mobile-1.3.0.min.js在一个文件中给出错误
基础结构要求的jquery.js和jqueryMobile文档中记录的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移动js文件的文件有一个单独的js文件,但是当我这样做(简单地通过剪切和休闲区的jQuery Mobile的代码到底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
嗯,你为什么要那样做?他们是单独的文件的原因.... – Neal 2013-03-07 14:14:02
我的框架合并为一体的客户端性能的JavaScript。我认为它们是单独的文件,因为它们是单独的项目,有任何技术上的理由不会将它们合并到单个文件中? – 2013-03-07 14:23:32
您是否尝试在连接时在文件之间添加';'? – 2013-03-07 14:32:32