jQuery is still quite relevant and helpful. Despite the hype with newer libraries, jQuery is used on 73% of _all_ websites. https://w3techs.com/technologies/overview/javascript_library... I often tell myself, ok, I'm going to just use vanilla JS for this one, but compared to jQuery, it's way too verbose. Try doing $('.my-elements').show() in vanilla js. The problem is the jQuery foundation has become too bureaucratic…
That's actually a good example. My gut feeling was simply to write the following. document.getElementsByClassName("my-class")[0].style.display = 'block'; The PlainJS site mentions that it's not quite that simple and suggests writing your own show() and hide() functions if you're avoiding jQuery. https://plainjs.com/javascript/effects/hide-or-show-an-eleme...
It would need to be something like this, though it still doesn't automatically handle inline vs block:
document.querySelectorAll('.my-elements').forEach(function(el){el.style.display = 'block'})
And apparently there are issues even with that: https://css-tricks.com/snippets/javascript/loop-queryselecto...