12
Quick and easy AJAX:
The following allow you to make anchors like
<a href='http://www.google.com/' rel='#myselector' class='ajax' />
which do an AJAX query on the href URL and inject the result into the first element defined by the selector in the anchor's rel attribute.
// Allow hrefs with the class 'ajax' and a rel attribute set with a selector to load content via ajax into the selected element.
$('.ajax').unbind('click').click
(
function(e)
{
$($(this).attr('rel')).load($(this).attr("href"));
e.preventDefault();
}
);