Data-attributes in Js
Week2 little takeaways of jQuery and Html
The logic behind the shooting star is fairly easy. When creating $starNode, try give them both a className as stars, and also a self defined data-attribute: nodeIndex.
The custom data attributes is super easy to store extra “properties” that we wish to hide within the Html tag. It provides cleaner access selectors.