jquery-mobile - JQuery外部工具栏不显示
问题描述
想使用 JQuery 移动外部工具栏小部件。完全按照https://demos.jquerymobile.com/1.4.0/toolbar-external/中的描述进行操作,但标题不显示。相反,会引发“工具栏不是函数”错误。这是我的代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<link href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
<script>
$(function(){
$( "[data-role='header'], [data-role='footer']" ).toolbar();
});
</script>
</head>
<body>
<div data-role="header" data-theme="a">
<h1>Toolbar</h1>
</div>
<div data-role="page" id="page">
<div data-role="content">Content</div>
</div>
</body>
</html>
使用本地 .js 源没有区别。
解决方案
推荐阅读
- python - Python 代码在我使用键盘停止时运行
- c - 我可以在任何我想要的地方保存 C 静态库吗?
- php - 当 curl_exec 并显示 ERR_EMPTY_RESPONSE 时页面消失
- php - 通过 PHP 脚本在 Wordpress 中的 JSON 请求失败
- javascript - this.$refs 在 Vue 组件中始终为空或未定义
- javascript - Javascript 错误 - 未捕获的 TypeError:无法将属性“宽度”设置为 null
- arrays - 将字符串变量放入数组中,然后将不同的字符串变量值与数组中的变量值进行比较
- python - 使用 selenium Python 循环访问 webelements
- javascript - 确认电子邮件是否已存在于 MongoDB 数据库中
- python - 如何生成自定义张量流训练/验证数据,