3 ms·
I use jQuery because the DOM API for javascript sucks, and writing jQuery is fun. How many lines of code are actually needed to give you selectors and the most
by ubernostrum 13y ago
I use jQuery because the DOM API for javascript sucks, and writing jQuery is fun.
How many lines of code are actually needed to give you selectors and the most common DOM manipulations?
How many lines of code are in jQuery?
Is there anything which would not be in selectors + common manipulations that you need, and which only jQuery can provide?
- padseeker 13y agoDOM selectors and events are critical, maybe ajax. Perhaps you could pare it down a bit - I don't need the animation stuff. I have no idea what the size using only what I might need when I needed it. But then that becomes a whole another endeavor - how much load time will be saved by only using the parts you need, and how long will it take to figure out what you need and what you dont? It's all about return on investment. What do I need now, what won't I ever use, and what might I use later. It becomes more work to save, what, 1/4 second? Maybe a bit more on mobile. It isn't worth the trouble. The whole obsession over the load time of jquery feels like an exercise in OCD.