Post by ziatakis » Wed Mar 18, 2020 8:12 am

Hello,
O.C. 2.0.3.1 - Theme journal 2

I am trying to implement scrollspy function. Installed bootsrap css and js. Followed all the instructions from here : https://getbootstrap.com/docs/4.4/components/scrollspy

I copy the following HTML to an information page :

Code: Select all

<div id="list-example" class="list-group">
  <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a>
  <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a>
  <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a>
  <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a>
</div>
<div data-spy="scroll" data-target="#list-example" data-offset="0" class="scrollspy-example">
  <h4 id="list-item-1">Item 1</h4>
  <p>...</p>
  <h4 id="list-item-2">Item 2</h4>
  <p>...</p>
  <h4 id="list-item-3">Item 3</h4>
  <p>...</p>
  <h4 id="list-item-4">Item 4</h4>
  <p>...</p>
</div>
But still the link redirects me to homepage, not to section id.
Any ideas??
Last edited by straightlight on Wed Mar 18, 2020 8:30 am, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Mon Oct 09, 2017 11:29 pm
Who is online

Users browsing this forum: No registered users and 2 guests