3 ms·
I was quite surprised to learn about the attr function [0] that allows you to query the selected element's attributes, but it's actually been around for a while
by eatonphil 10y ago
I was quite surprised to learn about the attr function [0] that allows you to query the selected element's attributes, but it's actually been around for a while now and is supported by most (/ all?) browsers. Pretty nifty.
[0] https://developer.mozilla.org/en-US/docs/Web/CSS/attr https://developer.mozilla.org/en-US/docs/Web/CSS/attr