jQuery select element with data attribute
#attribute#data#jquery#select
// Select the element with .classname that has the data-attribute "field" set to "yes" $('.classname[data-field = yes]') // addClass example $('.classname[data-field = yes]').addClass('selected');