Javascript
Description
JavaScript is required for this component to request the card contents and to cycle through each card.
The contents of the cards are generated dynamically from a text file that is fetched across the network.
To create a connection between a particular card-ticker component and its source of data, data-js-card-ticker-source="path-to-source-file" needs to be present at the component level. This data-attribute will hold the path to the source file that populates the cards with content.
If the request for data is unsuccessful, the component will not be displayed on the page.
Data attributes:
[data-js-card-ticker]: This attribute identifies the wrapper that holds the card-ticker carousel;[data-js-card-ticker-carousel]: This attribute identifies the card-ticker carousel;[data-js-card-ticker-item]: This attribute identifies an item within the card-ticker carousel;[data-js-card-ticker-source]: This attribute creates a connection between the component and its source of data. It holds the path to the source file that populates the cards with content
Usage
Usage example
Introductory label