Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Vanilla JS or jQuery for click events? Reply To: Vanilla JS or jQuery for click events?

#175511
nixnerd
Participant

I think it gets a little hairy when you are trying to target only one instance of a class and trying to tie events to other elements. That to me gets pretty verbose. You can accomplish the same exact thing with just a few lines of jQuery.

However… my insatiable desire for simplicity and minimalism will win out.

jQuery on its face seems to be the more elegant, more simple solution. But, I know it’s all a facade. It’s an abstraction that hides a great deal of code. I cringe at the idea of importing an entire library or even a portion of a library just to handle click events. Seems freaking absurd. So, I’ll go with vanilla JS.

There are a ton of sites popping up recently that help out with the transition for the basic stuff that most people use jQuery for.

For anyone reading this thread in the future, another such site that @shaneisme speaks of is:

http://toddmotto.com/is-it-time-to-drop-jquery-essentials-to-learning-javascript-from-a-jquery-background/