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

Can link to anchors from other pages #190

Open billywardrop29 opened 4 years ago

billywardrop29 commented 4 years ago

Hi

If I add a link such as http://dev.myeduapp.co.uk/#secondPage-edu to my FAQs page second question (http://dev.myeduapp.co.uk/faq) which points to my second

anchor, it still loads the first page. Then when I vertical scroll the anchor url in the address bar changes to the corrects anchors as you scroll. I have added the anchors as per your documentation but cant get it to work. What am I doing wrong?

I've attached my js and my url is pagepiling.js.txt

Cheers

Billy

alvarotrigo commented 4 years ago

I can't reproduce the issue on the demo page, it seems to be working as expected there: https://alvarotrigo.com/pagePiling/#page2

Can you please provide an isolated reproduction in jsfiddle or codepen, with no CSS or JS files external to pagePiling.js and the minimum amount of HTML code? Use empty sections unless strictly necessary for the reproduction.

Perhaps you might find useful to read my article regarding how to create isolated reproductions.

gbrle commented 4 years ago

Same problem, but just on Firefox & Safari.

Chrome and IE, its ok !

alvarotrigo commented 4 years ago

Sounds like you are probably missing this parts in the docs?

Be careful! data-anchor tags can not have the same value as any ID element on the site (or NAME element for IE).

billywardrop29 commented 4 years ago

Sorry I've not had a chance to set up in jsfiddle. Here is my code in action http://dev.myeduapp.co.uk/#firstPage-edu. I will try setup a demo in the next few days

alvarotrigo commented 4 years ago

I'll wait for the isolated reproduction.