Appending HTML

Ajax applications are often no more than a request for a chunk of HTML. This technique, sometimes referred to as Asynchronous HTTP and HTML (AHAH), is almost simple to implement with jQuery. First, we need some HTML to insert, which we'll place in a file called a.html alongside our main document. This secondary HTML file begins as follows:

<div class="entry">   <h3 class="term">ABDICATION</h3>   <div class="part">n.</div>   <div class="definition">     An act whereby a sovereign attests his sense of the high     temperature of the throne.     <div class="quote">       <div class="quote-line">Poor Isabella's Dead, whose       abdication</div>       <div class="quote-line">Set all tongues wagging in the       Spanish nation.</div>  <div class="quote-line">For ...

Get Learning jQuery 3 - Fifth Edition 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.