1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Merge branch 'hnrch02-modal-toggle'

This commit is contained in:
Chris Rebert 2014-03-16 20:24:59 -07:00
commit 7cf7e42c67
2 changed files with 2 additions and 2 deletions

View file

@ -817,7 +817,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
} }
Modal.prototype.toggle = function (_relatedTarget) { Modal.prototype.toggle = function (_relatedTarget) {
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) return this.isShown ? this.hide() : this.show(_relatedTarget)
} }
Modal.prototype.show = function (_relatedTarget) { Modal.prototype.show = function (_relatedTarget) {

View file

@ -36,7 +36,7 @@
} }
Modal.prototype.toggle = function (_relatedTarget) { Modal.prototype.toggle = function (_relatedTarget) {
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) return this.isShown ? this.hide() : this.show(_relatedTarget)
} }
Modal.prototype.show = function (_relatedTarget) { Modal.prototype.show = function (_relatedTarget) {