[jQuery] Re: append mailto link to orphan plain text email address

2008-10-09 Thread skankster
Thank you, Ricardo. Although I don't like to think of dead cats... ;) On 8 Okt., 21:04, ricardobeat <[EMAIL PROTECTED]> wrote: > Here's a quick short function that will do the job: > > $('#deadcat').each(function(){ >     var lnk = $(this).html().replace(/([\w-]+@([\w-]+\.)+[\w-]+)/, ' href="mai

[jQuery] Re: append mailto link to orphan plain text email address

2008-10-08 Thread ricardobeat
Here's a quick short function that will do the job: $('#deadcat').each(function(){ var lnk = $(this).html().replace(/([\w-]+@([\w-]+\.)+[\w-]+)/, 'mailto:$1";>$1'); $(this).html(lnk); }); hope that helps, - ricardo On Oct 7, 3:06 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > What

[jQuery] Re: append mailto link to orphan plain text email address

2008-10-07 Thread David C. Zentgraf
What about using a regular expression match/replace? Seems like an obvious candidate. On 7 Oct 2008, at 04:38, skankster wrote: > > No one? > > On 2 Okt., 14:45, skankster <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have a div that contains simple text data with line breaks. I want >> to append

[jQuery] Re: append mailto link to orphan plain text email address

2008-10-07 Thread skankster
Hi Ariel, Thanks for your answer. This is exactly what I was looking for. Cheers, Dirk On 7 Okt., 04:30, Ariel Flesler <[EMAIL PROTECTED]> wrote: > You can check my "Textnode Translator". I made a simple example where > it replaces textual emails. > That's just an example of course. I'd not re

[jQuery] Re: append mailto link to orphan plain text email address

2008-10-06 Thread Ariel Flesler
You can check my "Textnode Translator". I made a simple example where it replaces textual emails. That's just an example of course. I'd not rely on that code as it is. http://flesler.blogspot.com/2008/05/textnode-translator-for-javascript.html Alternatively, you can solve this with this Tokenize

[jQuery] Re: append mailto link to orphan plain text email address

2008-10-06 Thread skankster
No one? On 2 Okt., 14:45, skankster <[EMAIL PROTECTED]> wrote: > Hi, > > I have a div that contains simple text data with line breaks. I want > to append a mailto link to the email address but so far I have not > been able to select the email. > > The container looks something like this: > > >