jQuery & unobstrusive javascript


#1

Anyone know how to unobtrusively turn a normal link into an ajax
link using jQuery ?


#2

$(‘a#myUniqueID’).click(function () {
//Issue AJAX call and do something with it

return false; //By returning false, you prevent the browser from
redirecting you to the href of the a tag
});

Here are the docs for the AJAX stuff:
http://docs.jquery.com/Ajax

Good luck!

On Tue, Jan 13, 2009 at 1:38 AM, Andrew P. removed_email_address@domain.invalid
wrote:

Anyone know how to unobtrusively turn a normal link into an ajax
link using jQuery ?


-Richard A.