7 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 23d 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 23d agowhat did the JS provide that the CSS solve wasn't the only solve?
- jcranmer 23d 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 22d 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 22d 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 22d agoIt's still how I write JS. But I don't do professional frontend work. (That's by choice.)