mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
parent
b7ab799824
commit
0f366e0376
4
dist/js/bootstrap.js
vendored
4
dist/js/bootstrap.js
vendored
@ -1578,7 +1578,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
this.$element = $(element).is('body') ? $(window) : $(element)
|
this.$element = $(element).is('body') ? $(window) : $(element)
|
||||||
this.$body = $('body')
|
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.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
||||||
this.selector = (this.options.target
|
this.selector = (this.options.target
|
||||||
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
|| ((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
|
// SCROLLSPY DATA-API
|
||||||
// ==================
|
// ==================
|
||||||
|
|
||||||
$(window).on('load', function () {
|
$(window).on('load.bs.scrollspy.data-api', function () {
|
||||||
$('[data-spy="scroll"]').each(function () {
|
$('[data-spy="scroll"]').each(function () {
|
||||||
var $spy = $(this)
|
var $spy = $(this)
|
||||||
$spy.scrollspy($spy.data())
|
$spy.scrollspy($spy.data())
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
this.$element = $(element).is('body') ? $(window) : $(element)
|
this.$element = $(element).is('body') ? $(window) : $(element)
|
||||||
this.$body = $('body')
|
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.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
||||||
this.selector = (this.options.target
|
this.selector = (this.options.target
|
||||||
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||||
@ -143,7 +143,7 @@
|
|||||||
// SCROLLSPY DATA-API
|
// SCROLLSPY DATA-API
|
||||||
// ==================
|
// ==================
|
||||||
|
|
||||||
$(window).on('load', function () {
|
$(window).on('load.bs.scrollspy.data-api', function () {
|
||||||
$('[data-spy="scroll"]').each(function () {
|
$('[data-spy="scroll"]').each(function () {
|
||||||
var $spy = $(this)
|
var $spy = $(this)
|
||||||
$spy.scrollspy($spy.data())
|
$spy.scrollspy($spy.data())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user