Tim Kadlec 8/11/2008

New Way to Store Custom Data

Read Original

This article discusses the HTML5 feature of custom data attributes (e.g., data-validation). It explains their purpose for storing script-related data privately on elements, compares them to existing workarounds like misusing the class attribute, and details two JavaScript access methods: getAttribute() and the newer, not-yet-widely-supported dataset property.

New Way to Store Custom Data

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser