| "I encourage you to give it a shot. Write your next application, library or just code for fun without jQuery. " Been there, done that.
And it's a pain in the * You'll find yourself needing a method to add or remove classes eficiently. So you'll rewrite .addClass() and .removeClass() Then you'll need a clean way to make Ajax and callbacks. You'll rewrite .ajax() and .when() Then you'll need to fade something in all browser. So you'll rewrite .animate() Ad lib. JQuery Minified and GZipped is 35k (not 90 as the op said, ignoring the gziping.) JQuery is cached in most browsers. The performance hit is not worth the pain of re-inventing the wheel. The problem is not JQuery, it's bad code. Bad code won't magically disappear in vanilla JS. |
You don't need to rewrite it, cf. this shim [1] for example.
> Then you'll need a clean way to make Ajax and callbacks. You'll rewrite .ajax() and .when()
They are plenty of good Ajax implementations, for example this one [2]. If you need promises, there are good libraries too [3].
> Then you'll need to fade something in all browser. So you'll rewrite .animate()
Applying a fading effect on an element shouldn't be a mandatory feature. You can just use CSS3.
[1] https://developer.mozilla.org/en-US/docs/DOM/element.classLi...
[2] http://jibbering.com/2002/4/httprequest.html
[3] https://github.com/kriskowal/q