posted 14 years ago
For example, here's an example I like to use. Following is some typical code to make an Ajax request, sending the value of a form field as a parameter, and shove the response text into a DOM element:
Here's the equivalent code using jQuery:
And this is a fair comparison. Both code examples work across multiple browsers that support Ajax, and both properly encode the request body.
The jQuery code actually performs some error-checking and event handling that the raw JavaScript example doesn't do.