mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02:00
Modify scrollspy to add .active to all parent li items /cc @fat
This commit is contained in:
4
docs/assets/js/bootstrap.js
vendored
4
docs/assets/js/bootstrap.js
vendored
@@ -1621,7 +1621,7 @@
|
||||
this.activeTarget = target
|
||||
|
||||
$(this.selector)
|
||||
.parent('.active')
|
||||
.parents('.active')
|
||||
.removeClass('active')
|
||||
|
||||
selector = this.selector
|
||||
@@ -1629,7 +1629,7 @@
|
||||
+ this.selector + '[href="' + target + '"]'
|
||||
|
||||
active = $(selector)
|
||||
.parent('li')
|
||||
.parents('li')
|
||||
.addClass('active')
|
||||
|
||||
if (active.parent('.dropdown-menu').length) {
|
||||
|
Reference in New Issue
Block a user