Browse Source

Merge pull request #2769 from radiohead/patch-1

[Dropdown] Allow `onHide` callbacks to prevent Hiding
pull/2414/merge
Jack Lukic 9 years ago
parent
commit
e76da7cb22
1 changed files with 6 additions and 5 deletions
  1. 11
      src/definitions/modules/dropdown.js

11
src/definitions/modules/dropdown.js

@ -430,11 +430,12 @@ $.fn.dropdown = function(parameters) {
; ;
if( module.is.active() ) { if( module.is.active() ) {
module.debug('Hiding dropdown'); module.debug('Hiding dropdown');
module.animate.hide(function() {
module.remove.visible();
callback.call(element);
});
settings.onHide.call(element);
if(settings.onHide.call(element) === false) {
module.animate.hide(function() {
module.remove.visible();
callback.call(element);
});
}
} }
}, },

Loading…
Cancel
Save