-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
afterLoad always fires first index=1 even accessing the page on anchor=3 #2519
Comments
I can't reproduce your issue: Closed until an isolated reproduction is provided as detailed in the reporting issues guidelines and the issue skeleton. |
It does not work if you do it with the "active" class. The user has to to come through a deep link. Ok forget jsfiddle. Codepen is much better here: Edit: |
Oh, you mean by accessing through the anchors. I see. |
I also tested it with the CSS .active class. When you enter directly e.g. the third section (#thirdSection) fullpage.js toggles the active class on the home/first section for a very short time. Also the images implemented with lazy-loading ("data-src") load on the home/first section, when you enter the page on any other section. The option "animateAnchor" has no consequence on the problem. |
I don't think that's the case. You are just probably seeing the 1st section for a moment as the library needs to apply its css and classes. If you initialize fullPage.js on the header on document ready you shouldn't get the blink. This can clearly be seen in my example when changing the Javascript If you think that's the case, then you'll have to provide some prove of it regarding the addition of the |
You have to come trough a anchor link. It does not work if the I uploaded the files onto a normal webserver so we don't have the problem with the changing url of the codepen/jsfiddle iframe and can attach anchor links. http://www.arisur.info/fullpage/index.html#Section3
Also the image on section 1 which has no If we set the option Edit: Oh now I understand where I was unclear. I tested the automatic toggle of the active class. I didn't ment I tested this behavior with the preassigned active class. |
Yeah right. Then we agree :) |
Fixed on the dev branch 2.9.4 |
Fixed in the latest release 2.9.4 |
Hi, I have a question about the afterLoad callback:
When I open a deep link to a fullpage.js site (e.g. http://alvarotrigo.com/fullPage/#3rdPage) the afterLoad callback get once called with index = 1 then the page scrolls to the third section and afterLoad will be called again with index = 3. So no matter where I really wanna go, the first section will always load fully once?
I'm asking about this behavior because I'm lazy loading heavy image backgrounds with the help of the afterLoad callback. But if the user doesn't enter the page on the first section, the images load anyway because afterLoad always fires on the first section first.
How can I determine if a user is just passing through the first section on his way to another section first, or if he is loading the first section to stay on it?
I would provide a jsfiddle but I dont know how to set a deep link into the jsfiddle result frame.
The text was updated successfully, but these errors were encountered: