honestbleeps / Reddit-Enhancement-Suite

Reddit Enhancement Suite
http://redditenhancementsuite.com
GNU General Public License v3.0
4.15k stars 878 forks source link

jQuery vs Vanilla JS #3780

Open wojtekmaj opened 7 years ago

wojtekmaj commented 7 years ago

Looking on the code I can see a mix of vanilla JS and jQuery (e.g. element.classList.toggle('className') vs ${element).toggleClass('className')). I guess this inconsistency is not something we'd like to have, so I'd like to know which way would you guys like to go?

jewel-andraia commented 7 years ago

My vote is on vanilla JS.. although I am partial to jQuery when handling large sets of elements.

erikdesjardins commented 7 years ago

I would also like to eventually get rid of jQuery, but there are a few things:

But for new code definitely use vanilla JS, unless you're creating elements then use whatever you think is cleaner.

wojtekmaj commented 7 years ago

Hmmm... Not that I'm all against jQuery, I agree it could be useful in lots of places... In others though, it's needless. For the sake of this reply let's assume we'd like to get rid of jQuery...

erikdesjardins commented 7 years ago

That all makes sense.