vendor/assets/javascripts/collapse.js in active_frontend-1.0.11 vs vendor/assets/javascripts/collapse.js in active_frontend-2.0.0
- old
+ new
@@ -18,11 +18,11 @@
}
if (this.options.toggle) this.toggle()
}
- Collapse.VERSION = '3.3.2'
+ Collapse.VERSION = '3.3.4'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
@@ -161,10 +161,10 @@
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
- if (!data && options.toggle && option == 'show') options.toggle = false
+ if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
\ No newline at end of file