|
|
|
|
|
by franciscop
1988 days ago
|
|
I made Umbrella JS back in the day, a 3kb alternative to jQuery born from the question: You might not need jQuery, then what do you need? https://umbrellajs.com/ It's heavily inspired by "You might not need jquery" as the intro shows! Lots of the methods are just like in these examples, only with looping/multiple nodes. Example: $(el).addClass(className);
vs
el.classList.add(className); Do not work the same. jQuery (and Umbrella JS) deal with multiple elements and with multiple class names in multiple formats (as a string, as arguments, etc). That's why I find myself still using Umbrella JS from time to time in smaller non-React projects! Just makes everything a lot easier, for 3kb. |
|