【发布时间】:2011-11-15 18:32:09
【问题描述】:
我有一个 index.html 页面,它加载 jquery 和 jquery 移动库(最新版本)以及指向其他两个页面的链接。
<a href="page2.html" class="ui-state-persist" id='some_id' data-role="button" data-theme="e" >Page2</a>
<a href="page3.html" class="ui-state-persist" id='some_id' data-role="button" data-theme="e" >Page3</a>
是否可以在第 2 页和第 3 页中包含自定义 javascript 文件?如果我像这样 page2.html 正确呈现它们,但 js 文件似乎被忽略了。这样做的目的是在主菜单和应用程序页面之间分配加载 javascript 的等待时间。
page2.html:
<!DOCTYPE html>
<html>
<head>
<title>My Apptitle>
<meta charset="utf-8"/>
<!-- custom files and libraries -->
<script src="../js/mycode.js"></script>
</head>
<body>
<div data-role="page" id="preTktTab">
<div data-role="header" data-position="inline">
<!-- and so on -->
【问题讨论】:
标签: jquery jquery-mobile navigation