In jQuery or JavaScript, I am wanting to get an element, or rather, select an element, by its data attribute, then apply a CSS class using addClass to the selected element.
Does anybody know how to do this? I've tried all the different .attr and .prop methods but they don't do what I want, as I don't know the ID or anything of the element beforehand, as it is set dynamically.