Home › Forums › JavaScript › ScrollSpy.js (Multiple Data Targets) › Reply To: ScrollSpy.js (Multiple Data Targets)
October 9, 2014 at 1:25 pm
#185909
Participant
The function
$("body").scrollspy({ target: ".scrollspy" });
applies the “active” class to each li on scroll. The main point here is I am trying to change the target to:
$("body").scrollspy({ target: ".scrollspy2" });
when the new navbar/content is shown, but it seems to have no effect.