Browse Source

#5892 - Add onChanging callback

pull/5282/merge
Jack 6 years ago
parent
commit
d168eab171
1 changed files with 5 additions and 2 deletions
  1. 7
      src/definitions/modules/accordion.js

7
src/definitions/modules/accordion.js

@ -169,6 +169,7 @@ $.fn.accordion = function(parameters) {
}
module.debug('Opening accordion content', $activeTitle);
settings.onOpening.call($activeContent);
settings.onChanging.call($activeContent);
if(settings.exclusive) {
module.closeOthers.call($activeTitle);
}
@ -232,6 +233,7 @@ $.fn.accordion = function(parameters) {
if((isActive || isOpening) && !isClosing) {
module.debug('Closing accordion content', $activeContent);
settings.onClosing.call($activeContent);
settings.onChanging.call($activeContent);
$activeTitle
.removeClass(className.active)
;
@ -574,10 +576,11 @@ $.fn.accordion.settings = {
duration : 350, // duration of animation
easing : 'easeOutQuad', // easing equation for animation
onOpening : function(){}, // callback before open animation
onOpen : function(){}, // callback after open animation
onClosing : function(){}, // callback before closing animation
onChanging : function(){}, // callback before closing or opening animation
onOpen : function(){}, // callback after open animation
onClose : function(){}, // callback after closing animation
onChange : function(){}, // callback after closing or opening animation

Loading…
Cancel
Save