mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-22 15:30:23 +00:00
fixes #8957
This commit is contained in:
parent
e969d2ff18
commit
f6cec812a6
3 changed files with 7 additions and 3 deletions
4
dist/js/bootstrap.js
vendored
4
dist/js/bootstrap.js
vendored
|
|
@ -219,7 +219,9 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
|||
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
||||
|
||||
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')
|
||||
}
|
||||
|
||||
|
|
|
|||
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -56,7 +56,9 @@
|
|||
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
||||
|
||||
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')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue