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

pat-carousel — 'jump-to' behaviour doesn't function #1044

Open
cornae opened this issue Sep 3, 2022 · 0 comments
Open

pat-carousel — 'jump-to' behaviour doesn't function #1044

cornae opened this issue Sep 3, 2022 · 0 comments
Assignees

Comments

@cornae
Copy link
Member

cornae commented Sep 3, 2022

When clicking on a link that has an ID in its href that matches the ID of one of the carousel elements, the carousel is intended to scroll to the appropriate position as illustrated in the first and second demo on the Patterns site. The demo however doesn't function at this moment.

Proposed behaviour:

  1. Carousel initialises and scans for IDs (if any) on the carousel slides.
  2. Carousel scans dom tree for any HREF attributes with values that match any of the IDs.
  3. Links that have an HREF value that matches an ID will act as a 'jump-to-slide-trigger'.
  4. A class current is added to the link that is associated with the active slide and the current classes are removed from links associated with the same carousel, but that are not associated with the active slide.
  5. The current class behaviour also functions when the user slides the carousel using gestures.
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