Enhancement proposal: labelled dots #198
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a request from some clients to enable labels in slider dots to make it more obvious the slide number.
I though this could be a useful feature for the rest of the community, hence here is what I propose:
introduce a new settings:
by default the labeDots is false and the dots appear as they currently are.
However, a user can parse an empty array or a an array of custom labels. In both cases an additional class is added to the dot container
label-dots
so as to ensure the dots are large enough to envelope the labels with the following additional rule in css stylesheet:If the option
labelDots
is an empty array, thedot.innerText
is set to the current slide index (+1), else if a corresponding label exist in the passed array, then that value is used instead.