Table of content (toc) is not working properly

Hi,
We are trying to implement a toc for the different sections of a page. You can check it here:

However the second link of the toc goes to the same section as the first link no matter what we do.
We’ve tried everything and we don’t find what cause this issue.
Help please.
Thanks

Hey there,

TOC does not work in the Content Builder because it uses WordPress’ <!--nextpage--> code. It will only work in the default WordPress editor.

Backend:

Frontend:

Thanks.

Hi. Thanks for your response. We are not sure if you noticed that we are not implementing TOC for targeting a different page, we just need it to target a specific part of the same page, so we don’t need <!--nextpage--> code. In fact, to implement TOC we inserted the following code inside a content band element:

<div class="x-toc block">
   <h4 class="h-toc">In this article:</h4>
   <ul class="unstyled cf"> 
      <li class="x-toc-item"><a href="#sec1" title="Why decompiling your MT4 files">Why decompiling your MT4 files</a></li> 
      <li class="x-toc-item"><a href="#sec2" title="Request a free decompiling">Request a free decompiling</a></li>
   </ul>
</div>

The code above works but the only problem is that both of the links jump to the same section of the page no matter we do. We need help with this. Thanks

Forget about this. I will dismiss this feature from Pro theme because it is working erratically no matter what we do. Best