diff options
| author | Tobias Lindig <[email protected]> | 2014-01-22 14:09:41 +0100 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-03-16 19:58:12 -0700 |
| commit | 0f366e03765ce1daa932562b77de78eb5f90ac28 (patch) | |
| tree | e746e18580aa884961cc3a227846d3c34d79b202 | |
| parent | b7ab7998248696392d3d4c4b1335ef2b6b10d29f (diff) | |
| download | bootstrap-0f366e03765ce1daa932562b77de78eb5f90ac28.tar.xz bootstrap-0f366e03765ce1daa932562b77de78eb5f90ac28.zip | |
correct event naming of `scroll` and `load' event
closes #12337
| -rw-r--r-- | dist/js/bootstrap.js | 4 | ||||
| -rw-r--r-- | js/scrollspy.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index bf6a6a202..5a130ff02 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -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()) diff --git a/js/scrollspy.js b/js/scrollspy.js index fc907f11b..137bd373f 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -19,7 +19,7 @@ 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 @@ -143,7 +143,7 @@ // 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()) |
