alvarotrigo / pagePiling.js

pagePiling plugin by Alvaro Trigo. Create a scrolling pile of sections. http://alvarotrigo.com/pagePiling/
4.1k stars 654 forks source link

PagePilling catch every link with #, and scroll to the first section. #239

Open micilini opened 10 months ago

micilini commented 10 months ago

I'm using Page Pilling with following configuration:

$( document ).ready(function() {

    /* Page Pilling */

    $('#pagepiling').pagepiling({
        anchors: ['home'],
        menu: '#menu-header'
    });

});

Inside my .section-2, I have some links that I use to control my TabBar:

<ul class="menu d-flex flex-wrap list-inline h100p">
      <li class="online-startegies">
           <a class="active" href="#online-strategies">Online Startegies</a>
      </li>
      <li class="online-startegies">
           <a class="active" href="#services">Servicess</a>
      </li>
</ul>

When I click in one of theses links, Page Pilling Redirects me to.section-1, why?

alvarotrigo commented 10 months ago

You won't be able to use internal anchors/links when using pagePiling.js.

pagePiling.js think they belong to the anchors of a section and will try to scroll to them thus creating the issue.

micilini commented 10 months ago

Thanks.