Skip to content
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

Timeout #217

Open
AntonHonchar opened this issue Jan 8, 2021 · 6 comments
Open

Timeout #217

AntonHonchar opened this issue Jan 8, 2021 · 6 comments

Comments

@AntonHonchar
Copy link

Hello, alvarotrigo.
I've just found one more interesting thing.
So we have - var autoPlayDuration = 1000;
But first slide (when page load ) change much faster than 1000. After that everything is ok.
Do you have any ideas how to fix that? Because it's really to fast (just first slide)

@AntonHonchar
Copy link
Author

AntonHonchar commented Jan 8, 2021

Example of code:

var interval;
var timeout;
var autoPlayDuration = 1000;

$('#pagePiling').pagepiling({
    sectionsColor: ['yellow', 'orange', '#C0C0C0', '#ADD8E6'],
    loopBottom: true,
    afterLoad: function (anchorLink, index) {
        clearInterval(interval);
        clearTimeout(timeout);
        timeout = setTimeout(function () {
            interval = getInterval();
        },autoPlayDuration);
    },
    afterRender: function () {
        interval = getInterval();
    }
});


function getInterval() {
    return setInterval(function () {
        $.fn.pagepiling.moveSectionDown();
    }, autoPlayDuration);
}

@AntonHonchar
Copy link
Author

@victordc55
Copy link

@AntonHonchar
Copy link
Author

@alvarotrigo
Copy link
Owner

@AntonHonchar
Copy link
Author

@AntonHonchar consider the Fading Effect extension of fullPage.js for that.
https://alvarotrigo.com/fullPage/extensions/fading-effect.html

Thank you, Man! Great slider!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants