What are the advantageous of rewriting jQuery?
At first its important to understand why we are using jQuery. This is a really important question that you have to find your answer own your own.
- Two-way data-binding
- Modular development
- Browser compatibility — doing something like .attr() is much easier than the native alternatives, and won’t break across browsers.
- Simplification of usually complicated operations — if you’d like to see a well written cross browser compatible version of an XHR method, take a look at the source for $.ajax — for this method alone it’s almost worth the overhead of jQ
- DOM selection — simple things like binding events & selecting DOM elements can be complicated and differ per-browser. Without a lot of knowledge, they can also be easily written poorly and slow down your page.