use*_*844 1 javascript jquery-mobile
我知道这个问题在各地都有描述和解答,但我找不到我的问题.这是我的代码:
<!doctype html>
<html>
<head>
<title>jQM Complex Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script src="script.js" type="text/javascript"></script>
<!--<meta http-equiv="Content-Type" content="txt/html; charset=utf-8" />
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script src="mobileJquery.js"></script>-->
</head>
<body>
<div>
<h1><a href="http://www.stronteb.eu">test application</a></h1>
<p id="testparagraaf">test</p>
<img src="stront.gif"/>
</div>
<!--<script src="script.js" type="text/javascript"></script>-->
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
和script.js:
$( document ).on('pageload', 'index.html', function(e){
alert('Pageload');
});
Run Code Online (Sandbox Code Playgroud)
我知道jquery需要在script.js之前加载,这就是这里的情况.我试过把代码放到html中,没用...
谁知道这里的问题是什么?
亲切的问候
你没有加载jQuery本身.您需要在加载jQuery Mobile之前加载jQuery.jQuery Mobile不是jQuery,也不包含jQuery.
jQuery Mobile就像jQuery UI:它本质上是一个jQuery插件,你必须在加载插件之前加载jQuery.
| 归档时间: |
|
| 查看次数: |
2536 次 |
| 最近记录: |