Commit 483412a7 authored by Bootstrap's Grunt bot's avatar Bootstrap's Grunt bot

automatic `grunt dist`

[ci skip]
parent 85497228
...@@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') { ...@@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') {
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false if ($input.prop('checked')) changed = false
else $parent.find('.active').removeClass('active') if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} else { } else {
...@@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') { ...@@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') {
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle') Plugin.call($btn, 'toggle')
e.preventDefault() if (!$(e.target).is('input[type="radio"]')) e.preventDefault()
}) })
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
......
This diff is collapsed.
...@@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') { ...@@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') {
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false if ($input.prop('checked')) changed = false
else $parent.find('.active').removeClass('active') if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} else { } else {
...@@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') { ...@@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') {
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle') Plugin.call($btn, 'toggle')
e.preventDefault() if (!$(e.target).is('input[type="radio"]')) e.preventDefault()
}) })
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
......
This diff is collapsed.
Markdown is supported
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