diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index a2cba5ace..7b0c727b2 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -23,6 +23,7 @@ - **Steps** - Steps now use `flexbox`, the default horizontal theme has the active element point downward now instead of to the right. Steps no longer need `item count` and will automatically divide evenly **Enhancements** +- **Accordion** - adds `onOpening` and `onClosing` callback (before animation) to go with `onOpen`, `onClose` (after animation) **Thanks @cluppric** - **Build Tools** - Adjusting `site.variables` will now rebuild all UI, instead of just `site.less` - **Divider** - `vertical divider` inside `ui grid` now accounts for column padding - **Dropdown** - Dropdowns now automatically observe changes in `menu` and will update selector cache with new additions diff --git a/src/definitions/modules/accordion.js b/src/definitions/modules/accordion.js index 7a46ddfc1..a88a1b443 100644 --- a/src/definitions/modules/accordion.js +++ b/src/definitions/modules/accordion.js @@ -157,7 +157,7 @@ $.fn.accordion = function(parameters) { ; if(isUnopen) { module.debug('Opening accordion content', $activeTitle); - settings.onOpening.call(this); + settings.onOpening.call($activeContent); if(settings.exclusive) { module.closeOthers.call($activeTitle); } @@ -219,6 +219,7 @@ $.fn.accordion = function(parameters) { ; if((isActive || isOpening) && !isClosing) { module.debug('Closing accordion content', $activeContent); + settings.onClosing.call($activeContent); $activeTitle .removeClass(className.active) ; @@ -548,6 +549,7 @@ $.fn.accordion.settings = { onOpening : function(){}, onOpen : function(){}, + onClosing : function(){}, onClose : function(){}, onChange : function(){},