Chapter 12. Extending Ajax

This chapter covers

  • The jQuery Ajax framework
  • Adding Ajax prefilters
  • Adding Ajax transporters
  • Adding Ajax converters

Support for Ajax (Asynchronous JavaScript and XML) is one of the key features of jQuery, making it easy to request content from the server and to process the returned data and update the current page accordingly, without requiring a full refresh. You specify the URL to access, you can provide parameters to be sent along, and you can process the returned content in a callback function, as shown here:

$.ajax('product.php', {data: {prod_id: 'AB1234'},
    success: function(info) {...}});

jQuery also contains several convenience functions that encapsulate the Ajax abilities. For a simple request and ...

Get Extending jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.