我正在使用这段代码:
<script>
$(document).ready(function() {
$("#accordion").accordion(
active: false,
collapsible: true
});
</script>
但是手风琴坏了,所有面板都打开了。
我如何对其进行编码,以便手风琴面板区域全部关闭。
感谢那些可以帮助我的人。
我正在使用这段代码:
<script>
$(document).ready(function() {
$("#accordion").accordion(
active: false,
collapsible: true
});
</script>
但是手风琴坏了,所有面板都打开了。
我如何对其进行编码,以便手风琴面板区域全部关闭。
感谢那些可以帮助我的人。
It looks like you are missing several braces and parenthesis. Try this:
<script>
$(document).ready(function() {
$("#accordion").accordion({ // <- add this curly brace {
active: false,
collapsible: true
});
}); // <- add these to close the ready function
</script>
P.S. I'm sure a javascript error was raised for this. To see these errors, open up your javascript console. In Chrome, hit F12 and click on Console. In Firefox, install firebug and then hit F12. In IE, well, don't debug there. (I'm half kidding; IE has a debugger that you can use if you want.)
You have a few typos in your question code. This should work:
$(document).ready(function() {
$("#accordion").accordion({
active: false,
collapsible: true
});
});
Did you missed the {
?
$("#accordion").accordion({
active: false,
collapsible: true
});
试试这个设置
alwaysOpen: false
哦,你那里有一些丢失的大括号
$(document).ready(function() {
$("#accordion").accordion({
active: false,
collapsible: true,
alwaysOpen: false
});
});
$(document).ready(function () {
$("#accordion").accordion({
active:false,
collapsible:true
});
});