开发者

jQuery UI Accordion create event isn't firing

I need to run some co开发者_开发问答de after my jQuery UI accordion initializes. According to the documentation, I should be able to define a create event that runs when an accordion is created. But it never fires, even though the accordion is very successfully created.

$('#accordion').accordion({ 
    create: function(event, ui) { alert('This never fires'); },
});

I'm using jQuery 1.4.2 and UI 1.8.5. Any idea why this event may be not firing?


Turns out the problem is that jQuery UI 1.8.5 does not support the create: event. So you have to be using at least 1.8.9 in order to use it.

I wish the jQuery UI documentation had some reference to what version these features were added to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜