Created
November 17, 2012 05:19
-
-
Save anasnakawa/4093500 to your computer and use it in GitHub Desktop.
plugin events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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