0
我正在使用jQuery accordion,但第一个手风琴选项卡默认情况下已在页面加载时展开。我尝试添加了aria-selected="false"
到内嵌HTML,我试图改变/从线6345在jquery-ui.js除去这一点,但第一个标签仍然是扩大:如何更改jQuery手风琴的默认状态选项卡
// make sure at least one header is in the tab order
if (!this.active.length) {
this.headers.eq(0).attr("tabIndex", 0);
} else {
this.active.attr({
"aria-selected": "true",
tabIndex: 0
})
.next()
.attr({
"aria-expanded": "true",
"aria-hidden": "false"
});
}
任何指针?
编辑:新拨弄使用下面的回答:http://jsfiddle.net/pfeff/WNdRe/1/
谢谢,这工作!尽管为了让tab#1扩展,我必须点击tab#2,然后点击tab#1。首先点击标签#1不会展开它。 – miles
更新了答案。看到里面的小提琴。 –
所以现在我觉得很愚蠢。我试图重新创建你的小提琴,我没有得到任何错误,但它似乎并没有应用手风琴。测试:http://milespfefferle.com/demo/menutest.html – miles