Skip to content

Utilize data attributes to avoid duplicating and overriding IDs #6

@AlexOverbeck

Description

@AlexOverbeck

I love how simple this makes animating text!

However, the split results in duplicate IDs on the child characters. In other cases, if an id attribute is set on the initial element for in-page linking, that ID could be overridden if we aren't careful.

It seems like this could be avoided by swapping the IDs to data attributes.

For example:
<div data-splt-id="i1">
  <span data-splt-id="c1">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions