jQuery Accordion 默认显示的最后一部分?
默认情况下,如何使最后一部分在手风琴中处于活动状态?
$("#accordion").accordion("active", last)
因为我将在手风琴中拥有一组动态部分。
默认情况下,我希望最后一部分处于活动状态,
我该怎么做?
How can i make last section as active in accordion by default?
$("#accordion").accordion("active", last)
as I will have a Dynamic set of sections in the accordion.
By default i wan the last section to be active
How can i do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
活动(打开)面板的从零开始的索引。负值选择从最后一个面板向后的面板。
The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.
尝试使用
":last"
作为活动选择器。根据您的风格和偏好选择以下选项之一:[编辑:似乎您还需要传递“选项”或使用选项映射]
Try
":last"
as the active selector. Pick ONE of these options depending on your style and preferences:[edited: it seems like you also need to pass "option" or use an options map]
$( "#accordion" ).accordion( "选项", "活动", -1 );工作正常。
$( "#accordion" ).accordion( "option", "active", -1 ); works fine.