Commit f6cec812 authored by fat's avatar fat
Browse files

fixes #8957

parent e969d2ff
No related merge requests found
Showing with 7 additions and 3 deletions
+7 -3
...@@ -219,7 +219,9 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } ...@@ -219,7 +219,9 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
var $parent = this.$element.closest('[data-toggle="buttons"]') var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input').prop('checked', !this.$element.hasClass('active')) var $input = this.$element.find('input')
.prop('checked', !this.$element.hasClass('active'))
.trigger('change')
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
} }
......
This diff is collapsed.
...@@ -56,7 +56,9 @@ ...@@ -56,7 +56,9 @@
var $parent = this.$element.closest('[data-toggle="buttons"]') var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input').prop('checked', !this.$element.hasClass('active')) var $input = this.$element.find('input')
.prop('checked', !this.$element.hasClass('active'))
.trigger('change')
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment