From d168eab1710affc262d5c56312fd2cdc993b0e95 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 19 Feb 2018 21:12:21 -0800 Subject: [PATCH] #5892 - Add onChanging callback --- src/definitions/modules/accordion.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/definitions/modules/accordion.js b/src/definitions/modules/accordion.js index a6b327c74..170a5e805 100644 --- a/src/definitions/modules/accordion.js +++ b/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