Comment on Which side are you? Javascript or Typescript

<- View Parent
SnowdenHeroOfOurTime@unilem.org ⁨1⁩ ⁨year⁩ ago

That’s actually a great example of the shortcomings of jQuery. There are multiple ways to hide an element yet they standardized on one that often wouldn’t work.

Also you’re using an ancient method getElementById… I think visuals should still be controlled with css. So what is the right way to do that in modern js? document.querySelector(‘.some-name’).classList.add(‘hidden’) with that class defined in the css, with whatever makes sense, including maybe a css transition.

source
Sort:hotnewtop