mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-19 11:51:23 +02:00
grunt
This commit is contained in:
15
dist/js/bootstrap.js
vendored
15
dist/js/bootstrap.js
vendored
@@ -1821,8 +1821,9 @@ if (typeof jQuery === 'undefined') {
|
|||||||
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeTarget && scrollTop <= offsets[0]) {
|
if (activeTarget && scrollTop < offsets[0]) {
|
||||||
return activeTarget != (i = targets[0]) && this.activate(i)
|
this.activeTarget = null
|
||||||
|
return this.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = offsets.length; i--;) {
|
for (i = offsets.length; i--;) {
|
||||||
@@ -1836,9 +1837,7 @@ if (typeof jQuery === 'undefined') {
|
|||||||
ScrollSpy.prototype.activate = function (target) {
|
ScrollSpy.prototype.activate = function (target) {
|
||||||
this.activeTarget = target
|
this.activeTarget = target
|
||||||
|
|
||||||
$(this.selector)
|
this.clear()
|
||||||
.parentsUntil(this.options.target, '.active')
|
|
||||||
.removeClass('active')
|
|
||||||
|
|
||||||
var selector = this.selector +
|
var selector = this.selector +
|
||||||
'[data-target="' + target + '"],' +
|
'[data-target="' + target + '"],' +
|
||||||
@@ -1857,6 +1856,12 @@ if (typeof jQuery === 'undefined') {
|
|||||||
active.trigger('activate.bs.scrollspy')
|
active.trigger('activate.bs.scrollspy')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScrollSpy.prototype.clear = function () {
|
||||||
|
$(this.selector)
|
||||||
|
.parentsUntil(this.options.target, '.active')
|
||||||
|
.removeClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// SCROLLSPY PLUGIN DEFINITION
|
// SCROLLSPY PLUGIN DEFINITION
|
||||||
// ===========================
|
// ===========================
|
||||||
|
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/customize.min.js
vendored
2
docs/assets/js/customize.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/raw-files.min.js
vendored
2
docs/assets/js/raw-files.min.js
vendored
File diff suppressed because one or more lines are too long
15
docs/dist/js/bootstrap.js
vendored
15
docs/dist/js/bootstrap.js
vendored
@@ -1821,8 +1821,9 @@ if (typeof jQuery === 'undefined') {
|
|||||||
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeTarget && scrollTop <= offsets[0]) {
|
if (activeTarget && scrollTop < offsets[0]) {
|
||||||
return activeTarget != (i = targets[0]) && this.activate(i)
|
this.activeTarget = null
|
||||||
|
return this.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = offsets.length; i--;) {
|
for (i = offsets.length; i--;) {
|
||||||
@@ -1836,9 +1837,7 @@ if (typeof jQuery === 'undefined') {
|
|||||||
ScrollSpy.prototype.activate = function (target) {
|
ScrollSpy.prototype.activate = function (target) {
|
||||||
this.activeTarget = target
|
this.activeTarget = target
|
||||||
|
|
||||||
$(this.selector)
|
this.clear()
|
||||||
.parentsUntil(this.options.target, '.active')
|
|
||||||
.removeClass('active')
|
|
||||||
|
|
||||||
var selector = this.selector +
|
var selector = this.selector +
|
||||||
'[data-target="' + target + '"],' +
|
'[data-target="' + target + '"],' +
|
||||||
@@ -1857,6 +1856,12 @@ if (typeof jQuery === 'undefined') {
|
|||||||
active.trigger('activate.bs.scrollspy')
|
active.trigger('activate.bs.scrollspy')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScrollSpy.prototype.clear = function () {
|
||||||
|
$(this.selector)
|
||||||
|
.parentsUntil(this.options.target, '.active')
|
||||||
|
.removeClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// SCROLLSPY PLUGIN DEFINITION
|
// SCROLLSPY PLUGIN DEFINITION
|
||||||
// ===========================
|
// ===========================
|
||||||
|
2
docs/dist/js/bootstrap.min.js
vendored
2
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user