50 Projects in 50 Days, Day 4: Expanding Search Bar

50 Projects in 50 Days, Day 4: Expanding Search Bar

Today's project was a short one. The user begins with a search icon, and when it is clicked the search bar expands out.

The most interesting thing to me about this project was that I recall creating a similar effect a few years ago using jquery, but it was very convoluted. This implementation mainly uses CSS - another instance of my personal coding maxim, there's usually more than one way to accomplish something, and your personal way may not always be the best. Keep an open mind on these things.

This page uses the JS classList.toggle operation to expand and contract the search box.

My Project: Expanding Search Box