vendor/assets/javascripts/uikit/components/accordion.js in uikit2-rails-0.1.2 vs vendor/assets/javascripts/uikit/components/accordion.js in uikit2-rails-0.1.3

- old
+ new

@@ -1,6 +1,6 @@ -/*! UIkit 2.23.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ +/*! UIkit 2.24.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ (function(addon) { var component; if (window.UIkit) { component = addon(UIkit); @@ -69,15 +69,17 @@ toggleItem: function(wrapper, animated, collapse) { var $this = this; wrapper.data('toggle').toggleClass(this.options.clsactive); + wrapper.data('content').toggleClass(this.options.clsactive); var active = wrapper.data('toggle').hasClass(this.options.clsactive); if (collapse) { this.toggle.not(wrapper.data('toggle')).removeClass(this.options.clsactive); - this.content.not(wrapper.data('content')).parent().stop().css('overflow', 'hidden').animate({ height: 0 }, {easing: this.options.easing, duration: animated ? this.options.duration : 0}).attr('aria-expanded', 'false'); + this.content.not(wrapper.data('content')).removeClass(this.options.clsactive) + .parent().stop().css('overflow', 'hidden').animate({ height: 0 }, {easing: this.options.easing, duration: animated ? this.options.duration : 0}).attr('aria-expanded', 'false'); } wrapper.stop().css('overflow', 'hidden'); if (animated) {