You’re not just reinventing the wheel, and AJAX is a relatively small part of what jQuery has to offer. JQuery provides a huge number of conveniences that reduce pure JS bulk by about 90%.
Of particular import is the ability to select and manipulate DOM nodes using CSS selectors. Say you want to change a style on every <td> element with the class “foobar.”
$( 'td.foobar' ).css( 'font-face', 'bold' );
That’s it. Do you see how ridiculously powerful that is? No tediously looping over crappy DOM API methods to find the elements and tweak them. Just select a bunch of crap and do stuff to it.
Event handling is another thing that makes jQuery superior. Suppose you want to have an event handler that triggers whenever someone clicks one of the above-mentioned table cells:
$( 'td.foobar' ).click( function() { alert( "You clicked a cell with this data: " + $(this).html() ) } );
You can easily associate arbitrary state data with any element(s) using the data API.
$( '#narf' ).data( 'takeovertheworld', 1 );
Say you want to loop over a number of row elements and hide them if the row number is above 12 and there’s a hide bit stored on them:
$( 'tr.foobar-row' ).each( function( i ) {
var that = $(this);
if ( i > 12 && that.data( 'hidethis' ) === 1 ) {
that.hide();
}
} );
And of course, the jQuery AJAX libraries abstract out all the tedium of making sure XMLHttpRequest stuff is handled correctly in every browser. It’s in use on tens of thousands of sites and is far better testes and bugfixed than anything you could come up with.
The coolest feature, though, is the live API, which allows you to bind an event handler to any group of elements matching a selector, and will then automatically bind that same handler to any newly-created elements that also match the selector.