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

slideShowAutoStart #72

Closed
emmy008 opened this issue Mar 19, 2019 · 1 comment
Closed

slideShowAutoStart #72

emmy008 opened this issue Mar 19, 2019 · 1 comment

Comments

@emmy008
Copy link

emmy008 commented Mar 19, 2019

I'm just asking if there is a way such that when I have slideShowAutoStart set to true, that the parameters holds true even when changing albums? As of right now, if I change the album, is there a way that I can have the images to autostart?

Thanks

@jakubkowalczyk-pl
Copy link
Owner

You can listen if active album has been changed and then play slideshow:

let currentAlbum;

JGallery.create(albums, {
    itemOnShow: ({ album }) => {
        if (album !== currentAlbum) {
            document.querySelector('.j-gallery-play-icon').click();
        }
        currentAlbum = album;
    }
});

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

2 participants