我正在使用 jQuery Accordion
并且需要知道面板何时完成加载。我知道我需要绑定(bind) accordionchange
事件,但我真的很困惑如何知道面板何时打开。
如果我只是将 alert()
放入函数内,它会在面板打开后显示,但也会在面板关闭后显示:
$("#campaigns").accordion({
event: 'click',
active: false,
collapsible: true,
autoHeight: false,
heightStyle: "content"
}).bind("accordionchange", function(event, ui) {
alert('Panel opened and closed');
});
我如何才能知道面板何时完成打开?
最佳答案
http://api.jqueryui.com/accordion/#event-activate - 查看事件 - 当面板被激活(打开)时触发。
关于javascript - jQuery Accordion 知道面板何时完成打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14867395/