Skip to content

afterLoad always fires first index=1 even accessing the page on anchor=3 #2519

Closed
@medfx

Description

@medfx

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions