jQuery UI手风琴无法在本地目录的Safari中工作
jQuery UI accordion not working within Safari from local directory
免责声明:这是一个"python程序员"试图学习js和jQuery的问题。
我创建了一个手风琴如下(文件名:script.js locally):
$(document).ready(function() {
$('#menu').accordion();
});
我还有我的index.html:
<!DOCTYPE html>
<html>
<head>
<title>astrobox.io | Welcome!</title>
<link rel='stylesheet' type='text/css' href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type='text/javascript' src='script.js'></script>
</head>
<body>
<div id="menu">
<h3>Data Collection</h3>
<div>
<p></p>
</div>
<h3>Data Analysis</h3>
<div>
<p></p>
</div>
<h3>Data Visualisation</h3>
<div>
<p></p>
</div>
</div>
</body>
</html>
我真的不能百分之百肯定我做错了什么。任何关于解决方案的暗示都会受到热烈欢迎。我需要将"menu"
更改为类并使用$('.menu')
吗?
这些是我链接到的外部库:
<title>astrobox.io | Welcome!</title>
<link rel='stylesheet' type='text/css' href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type='text/javascript' src='script.js'></script>
非常感谢
<!DOCTYPE html>
<html>
<head>
<title>astrobox.io | Welcome!</title>
<link rel='stylesheet' type='text/css' href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.9.1/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$('#menu').accordion();
});
</script>
</head>
<body>
<div id="menu">
<h3>Data Collection</h3>
<div>
<p></p>
</div>
<h3>Data Analysis</h3>
<div>
<p></p>
</div>
<h3>Data Visualisation</h3>
<div>
<p></p>
</div>
</div>
</body>
</html>
相关文章:
- jQuery Datepicker可以在Safari中工作,但不能在FF或Chrome中工作
- 为什么我的JavaScript在Safari上的严格模式下不能正常工作
- jQuery$.post可以在chrome、safari中工作,但不能在FF中工作(声明成功回调函数未定义)
- 异步加载的SVG过滤器feColorMatrix在Chrome中工作,而不是在Safari或Firefox中
- RGB 到 HEX JavaScript 函数在 Chrome 中工作,但不能在 Firefox 或 Safari 中工
- setInterval 或 window.location 在 Opera、IE 和 Safari 中无法正常工作
- window.onbeforeunload在IE8中不触发(在Firefox,Chrome和Safari中工作正常)
- toLocaleString()不会'无法在Safari浏览器中工作
- 动画HTML5横幅工作在除Safari以外的一切
- Date.prototype.get日期;不能在Safari中工作
- jQuery UI手风琴无法在本地目录的Safari中工作
- html+css+js组合在Google Chrome或Safari浏览器中无法正常工作
- window.open()没有'无法在添加到主屏幕的移动Safari web应用程序中工作
- webkitAudioContext在iOS Safari上创建MediaElementSource不工作
- JQuery图像大小计算没有'不能在Chrome/Safari中工作
- JavaScript倒计时;不能在Safari中工作
- style.display无法在Chrome、Safari-Firefox、IE11中正常工作
- 为什么这个html5音频不能在chrome上工作,但在safari上工作得很好
- 复选框事件处理程序抛出错误的点击事件在chrome浏览器,safari工作良好的键盘事件
- document.referrer不在safari工作