A simple regex should take care of that for you. Just search for any
occurrence of @<any number of letters of numbers> and wrap the result in an
href tag. 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Betty B
Sent: Wednesday, October 22, 2008 1:28 PM
To: jQuery (English)
Subject: [jQuery] Autolinking Twitter @usernames with jQuery


Hi,

Fairly new to this, I'd like to know if such a thing is possible with
jQuery:

I have a social bookmarks-like page where users can post a link and
description. I'd like to have some kind of function that would automatically
link @USERNAME to that persons Twitter page (http://
twitter.com/USERNAME) when, or if, they add their @USERNAME to the
description field. (div class="description")

Can this be done with jQuery? Could someone point me in the right direction?

Thanks,
BB


Reply via email to