Console
hyTags
Home
Home
Getting Started
Getting Started
Documentation
Documentation
data-exists
Checks if a data attribute exists on an element
Parameter
Type
Description
name
string
The name of the data attribute to check (without the 'data-' prefix)
return
bool
True if the data attribute exists, false otherwise