我已經下載並安裝了jQuery UI 1.8.17,我嘗試應用手風琴,但沒有運氣。jQuery UI手風琴不起作用
我的代碼如下:
HTML
<html>
<head>
<title>Document Title</title>
<link href="../../css/tinyMCE/jquery_ui_wp_theme/jquery-ui-1.8.17.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="js/shortcodes.js"></script>
</head>
<body>
<div id="codes">
<h3><a href="#">Shortcode name</a></h3>
<div><p>Dialog content</p></div>
<h3><a href="#">Shortcode name</a></h3>
<div><p>Dialog content</p></div></div>
</div>
</body>
</html>
的JavaScript
jQuery(document).ready(
function($)
{
$('#codes').accordion();
}
);
與上面的代碼的問題是,雖然手風琴是正確地呈現,根本不起作用。這意味着,當我點擊手風琴面板標題時,沒有任何操作。
另外在我的控制檯中,我沒有得到任何JavaScript錯誤,並且所有文件都正常加載。任何想法如何解決這個問題?!
This is the accordion as it is rendered
你在頁面上的任何其他腳本或JavaScript庫,插件? – random 2012-02-11 13:47:11
我不使用任何其他插件。 :( – 2012-02-11 13:51:25