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

Show certain slide when loading page #250

Open
Andreas-2023 opened this issue Mar 26, 2023 · 2 comments
Open

Show certain slide when loading page #250

Andreas-2023 opened this issue Mar 26, 2023 · 2 comments

Comments

@Andreas-2023
Copy link

Hello,

I've just changed from tiny-slider to glider.js, and I wonder if glider.js has a special feature which tiny-slider has.

With tiny-slider I created a calendar, where each slide contains a month. On my website are displayed three months at the same time, and when the permalink contains e.g. "august", the slide for "august" is shown IN THE MIDDLE of the three months. I realized that with "startIndex" and a condition "if (str_contains($_SERVER['REQUEST_URI'], 'august')) { $startindex = 7; }

Is it possible, to do something similar with glider.js?

Thank you very much in advance for your help!
Andreas

@Andreas-2023 Andreas-2023 changed the title Show certain slide on loading page Show certain slide when loading page Mar 26, 2023
@NickPiscitelli
Copy link
Owner

Yeah, you can just call the method after initializing.

glider.scrollItem(<slide-number>)

@Andreas-2023
Copy link
Author

Andreas-2023 commented May 23, 2023 via email

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