
JavaScript

Handling JavaScript Event Listeners With Parameters — Smashing Magazine
Event listeners are essential for interactivity in JavaScript, but they can quietly cause memory leaks if not removed properly. And what if your event listener needs parameters? That’s where things get interesting. Amejimaobari Ollornwi shares which JavaScript features make handling parameters with event handlers both possible and well-supported. JavaScript event listeners are very important, as…

Creating The “Moving Highlight” Navigation Bar With JavaScript And CSS — Smashing Magazine
In this tutorial, Blake Lundquist walks us through two methods of creating the “moving-highlight” navigation pattern using only plain JavaScript and CSS. The first technique uses the getBoundingClientRect method to explicitly animate the border between navigation bar items when they are clicked. The second approach achieves the same functionality using the new View Transition API….
How To Create Multi-Step Forms With Vanilla JavaScript And CSS | CSS-Tricks
Multi-step forms are a good choice when your form is large and has many controls. No one wants to scroll through a super-long form on a mobile device. By grouping controls on a screen-by-screen basis, we can improve the experience of filling out long, complex forms. But when was the last time you developed a…