diff --git a/build/js/Treeview.js b/build/js/Treeview.js index da6eedda8..999ed6b8e 100644 --- a/build/js/Treeview.js +++ b/build/js/Treeview.js @@ -69,7 +69,7 @@ const Treeview = (($) => { this.collapse(openTreeview, openMenuLi) } - treeviewMenu.slideDown(this._config.animationSpeed, () => { + treeviewMenu.stop().slideDown(this._config.animationSpeed, () => { parentLi.addClass(ClassName.OPEN) $(this._element).trigger(expandedEvent) }) @@ -78,7 +78,7 @@ const Treeview = (($) => { collapse(treeviewMenu, parentLi) { const collapsedEvent = $.Event(Event.COLLAPSED) - treeviewMenu.slideUp(this._config.animationSpeed, () => { + treeviewMenu.stop().slideUp(this._config.animationSpeed, () => { parentLi.removeClass(ClassName.OPEN) $(this._element).trigger(collapsedEvent) treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp() @@ -159,4 +159,4 @@ const Treeview = (($) => { return Treeview })(jQuery) -export default Treeview \ No newline at end of file +export default Treeview