1
免責聲明:這是一個試圖學習js和jQuery的「python編碼器」的問題。jQuery UI手風琴不在本地目錄的Safari中工作
我已經創建了一個手風琴如下(文件名:本地的script.js):
$(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>
我真的不能100%確定我做錯了什麼。對解決方案的任何暗示都會受到熱烈的歡迎。我是否需要將"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>
非常感謝
嘗試之前'script.js'加載'jQuery的ui.js'並添加'的jquery.js '作爲jquery-ui依賴於此腳本 – empiric 2015-02-23 15:33:05
我已經將所有腳本和鏈接添加到外部庫中作爲編輯,如果這些腳本正確並且順序正確,可否告訴我。我明白這個命令很重要。 – 2015-02-23 15:45:15
可能會有衝突,因爲您添加了'jquery.js'兩次,在此刪除一個。 (第一行或第二行) – empiric 2015-02-23 15:48:45