Skip to content

Commit

Permalink
#5892 - Add onChanging callback
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Feb 20, 2018
1 parent 93083b6 commit d168eab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/definitions/modules/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
;
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit d168eab

Please sign in to comment.