r/css • • Jun 15 '21

Simple Navigation using HTML, CSS & jQuery

https://youtu.be/RU4v2uMY5as
22 Upvotes

9 comments sorted by

9

u/Direct_Swordfish_735 Jun 15 '21

Please use vanillajs and es6 block scoping. For dynamic styling use CSS variables or class toggles instead.

4

u/Hadr619 Jun 15 '21

still blows my mind that people are still pitching jQuery for simple uses that vanillajs would be way more efficient

1

u/DoNDaPo Jun 15 '21

As usual, it's so bad it hurts.

3

u/frontru Jun 15 '21

Why?

1

u/[deleted] Jun 15 '21

Just kind of stuck in the past when jQuery is mostly obsolete

2

u/tropix126 Jun 15 '21

Looks nice, but id highly suggest switching away from jQuery and the var keyword.

1

u/f314 Jun 15 '21

Please don’t use semantic elements (li in this case) to create decorations. For screen readers, this will look like a list with six elements, even though functionally there are five. Use something like the before or after pseudo-elements, or just a div, instead.

1

u/ColourfulToad Jun 15 '21

If it weren't midnight I'd write this in React just so you can see how much nicer it is. I might return in the morning, maybe it'll give some inspiration to give React a try - it's more than worth it. Vue and Svelte are great options too.

1

u/thinksInCode Jun 16 '21

Try adding some narration next time to explain what you're doing instead of just blaring music the whole time?

Also it's 2021, stop using jQuery for new projects