diff options
| author | Mark Otto <[email protected]> | 2014-03-16 20:38:12 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-03-16 20:38:12 -0700 |
| commit | c93c3714336ecefdb69b4dc7ebc40ea87eb40a36 (patch) | |
| tree | c0ff88481a1977781b0826bd56a0a0fd080ba2e3 /dist | |
| parent | b004c9ac393671489720be06739f01e5c1bec7fe (diff) | |
| parent | 96525fdec431f8d654ce0ea9b4f92c2a3ef9104b (diff) | |
| download | bootstrap-c93c3714336ecefdb69b4dc7ebc40ea87eb40a36.tar.xz bootstrap-c93c3714336ecefdb69b4dc7ebc40ea87eb40a36.zip | |
Merge branch 'master' of github.com:twbs/bootstrap
Diffstat (limited to 'dist')
| -rw-r--r-- | dist/js/bootstrap.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index bf6a6a202..b9ae0fc11 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -817,7 +817,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } 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) { @@ -1208,7 +1208,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var $parent = this.$element.parent() var orgPlacement = placement - var docScroll = document.documentElement.scrollTop || document.body.scrollTop + var docScroll = document.documentElement.scrollTop var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left @@ -1578,7 +1578,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element = $(element).is('body') ? $(window) : $(element) this.$body = $('body') - this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process) + this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process) this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.selector = (this.options.target || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 @@ -1702,7 +1702,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // SCROLLSPY DATA-API // ================== - $(window).on('load', function () { + $(window).on('load.bs.scrollspy.data-api', function () { $('[data-spy="scroll"]').each(function () { var $spy = $(this) $spy.scrollspy($spy.data()) |
