How to AJAX with jQuery
If you are frequently using AJAX calls in your website or application, jQuery’s built-in AJAX functions come in handy. Say you want to dynamically load the contents of a PHP file into a DIV:
<div id="content"></div>
<button onclick="jQuery.post('getContent.php', { contentId: '1' });">get content</button>
When you click the button, jQuery calls getContent.php and passes contentId via PUT to it and stuffs the response into the content DIV. Neat, isn’t it?
