4 ms·
I ran into the same problem about 20 years ago when implementing hover-based dropdown menus on a website. It was only about 10 lines of JS and a couple global v
by phyzome 1mo ago
I ran into the same problem about 20 years ago when implementing hover-based dropdown menus on a website. It was only about 10 lines of JS and a couple global variables but I was the only person who understood it. :-P
(These days I would have included more comments.)
Naturally, there was a fallback to pure CSS menus, because we weren't barbarians.
- dylan604 1mo agowhat did the JS provide that the CSS solve wasn't the only solve?
- jcranmer 1mo agoNot OP, but my guess is things like timing delay--20 years ago, CSS animations and transitions weren't a thing yet, especially since 20 years ago also puts us in the era of IE6 being a major browser.
- phyzome 1mo agoExactly. And on the browser front we had to contend with not only IE6, but IE5.5 on Mac, which was its own special beast.
- altacc 1mo ago> only about 10 lines of JS Ah, the good old days when we wrote JS function to do something, or copied from dHTMLZone. These days the first 10 lines of JS is loading hundreds of lines of JS libraries. (Yep, I'm an old man yelling at clouds!)
- phyzome 1mo agoIt's still how I write JS. But I don't do professional frontend work. (That's by choice.)