Eventually Consistent

Dispatches from the grey area between correct and working

Html Posts

2 posts found

html

HTML5 ClassList

It used to be pretty difficult to add and remove classes from page elements. Using vanilla JS required making a regular expression to search the elements class attribute for a match. JS libraries simplified the process but now HTML5 makes it even easier

Read more
html

HTML5 Dataset

Dataset allows for valid use of custom HTML attributes, prefixed with "data-" Before HTML5 you could use custom attributes at will but it would not be valid HTML. One of the things dataset does is make this practice pass validators and it allows for more easy access of custom attributes with javascript.

Read more