mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 10:34:07 +02:00
Modify scrollspy to add .active to all parent li items /cc @fat
This commit is contained in:
4
js/bootstrap-scrollspy.js
vendored
4
js/bootstrap-scrollspy.js
vendored
@@ -97,7 +97,7 @@
|
||||
this.activeTarget = target
|
||||
|
||||
$(this.selector)
|
||||
.parent('.active')
|
||||
.parents('.active')
|
||||
.removeClass('active')
|
||||
|
||||
selector = this.selector
|
||||
@@ -105,7 +105,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