Thursday, 1 December, 2016 UTC


Summary

People responded quite positively to "Hey designers, if you only know one thing about JavaScript, this is what I would recommend." Even the YouTube comments were positive.
Hey designers, if you only know one thing about JavaScript, this is what I would recommendhttps://t.co/X4DKhGzze3
(Video + Article)
— Chris Coyier (@chriscoyier) November 23, 2016
Benjamin De Cock mentioned that not only does he agree changing classes is the most important thing a web design can know how to do in JavaScript, he built a mini library around that idea:
@chriscoyier 100% agree — this is exactly why I made https://t.co/txfQnMfpbx, it does exclusively that.
— Benjamin De Cock (@bdc) November 23, 2016
It has a really unusual way of configuring it. You use plain language, within a <code> tag, to tell it what classes to change on click, like:
clicking on "h1" removes class "open" on "h1.open"
clicking on "h1" adds class "open" on "target"
Here's a fork of the "level up" demo from that video, done with uilang instead:
See the Pen Change Classes on Stuff by Chris Coyier (@chriscoyier) on CodePen.
Pretty cool.
Jeremy Keith had a good way of putting it too:
It reminds me of the old jQuery philosophy: find something and do stuff to it.
I'd stick to my sentiment as well though. If you're looking to baby step yourself into JavaScript, learning to select things and changes classes without any library help at all is a great way to do that.

The Power of Changing Classes is a post from CSS-Tricks