I have consecutive sections, and in between them I have an aside without a corresponding anchor. The issue is that the scrollspy is active with the previous section. I want to adjust the scrollspy so that nothing is highlighted as active at that point, and it should only resume when the next section with a valid anchor appears. I've tried various solutions from Exclude ID in Twitter Bootstrap Scrollspy, but they don't seem to work in bootstrap 4. I can't even get the trigger to work by using:
$('#nav-links').on('activate.bs.scrollspy', function () {
// or $('#nav-links li').on('activate.bs.scrollspy', function () {
// or $('#nav-links li').on('activate', function(){
alert('sdsd'); // no alert, but scrollspy is working
})
How can I configure the scrollspy to only highlight elements when the IDs of navigation links match those of scrolling elements, excluding others?
a) (partial help) How do I capture scrollspy firing events?