Patterns icon indicating copy to clipboard operation
Patterns copied to clipboard

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

Open cornae opened this issue 2 years ago • 0 comments

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.

cornae avatar Sep 03 '22 12:09 cornae