Skip to main content

Luke Harrison

I'm a UX / Front-End Developer & Article Writer from Sheffield UK, working full time by day & freelance by night.

Article

Managing State in CSS with Reusable JavaScript Functions – Part 2

In my previous article, which shall now retroactively be known as Managing State in CSS with Reusable JavaScript Functions - Part 1, we created a powerful reusable function which allows us to quickly add, remove and toggle stateful classes via click.

One of the reasons I wanted to share this approach was to see what kind of response it would generate. Since then I've received some interesting feedback from other developers, with some raising valid shortcomings about this approach … Read article

icon-link icon-logo-star icon-search icon-star