Forum: Ruby on Rails jQuery & unobstrusive javascript

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
613340c5fef56ad6fc3bf8cc617266ae?d=identicon&s=25 Andrew Porter (Guest)
on 2009-01-13 10:39
(Received via mailing list)
Anyone know how to unobtrusively turn a normal link <a> into an ajax
link using jQuery ?
57777e93348c9b8d1e8c7511da1287ba?d=identicon&s=25 Richard Aday (Guest)
on 2009-01-13 10:59
(Received via mailing list)
$('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 Porter <andy@defsdoor.org>
wrote:

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


--
-Richard Aday
This topic is locked and can not be replied to.