Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
plugin events
/* fired when any tab is clicked, ui here hold clicked tab and its content
* ui['tab'] // current tab
* ui['content'] // current tab content (div)
*/
click: function(event, ui) {}
// when accordion is initialized, ui here holds a jQuery object to the whole accordion
init: function(event, ui) {}
// when tab is shown, ui here hold the same as in click event above
tabShown: function(event, ui) {}
// when tab is hidden, ui here hold the same as in click event above
tabHidden: function(event, ui) {}
// How can you bind these events ?
// 1. at plugin initialization
$('#multiAccordion').multiAccordion({
active: 'all',
click: function(event, ui) {
alert('tab is clicked!');
}
});
// 2. after initialization
$('#multiAccordion').multiAccordion('multiAccordionclick', function(){
alert('also clicked');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment