The actual html reads

<span class="email">someone&lt;at&gt;somehwerecom</span>

Fahed

Ⓙⓐⓚⓔ wrote:

<div>jake <at> home </div>
renders as

<
div>jake <at> home </at></div>
for me in firefox 2. I guess the </at> just gets ignored when re-inserted with .html()

Not too bad!

On 5/12/07, *John Resig* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:


    $("span.email").each(function(){
      $(this).html( $(this).html().replace("<at>","@") );
    });

    $("p.jhide").hide();

    Not too bad!

    --John

    On 5/13/07, fambizzari < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:
    >
    > I started using jquery a month or two ago and i've spent the time
    > since then working on non js content. I've now come to do something
    > really basic and i'm really struggling how to do it with jquery. I
    > guess that is the problem with "changing the way that you write
    > JavaScript".
    >
    > Anyhow, i won't be leaving jquery any time soon (i don't think) and
    > i'd appreciate if someone could tell me how i do the following.
    >
    > Within html content i am including email addresses in the following
    > format <span class="email">someone<at> somehwere.com
    <http://somehwere.com></span> and then
    > following such occurences with <p class="jhide">an explanation for
    > what <at> means</p> for those non-savvy internet users that might
    > actually try to send an email with <at> instead of the @ sign.
    >
    > I want to getElementsByClass('email') and use javascript to replace
    > <at> with @. Then i want to getElementsByClass('jhide') and hide
    the
    > explanation which is no longer relevant.
    >
    > How do i do this in jquery? Thanks for all of your help.
    >
    >




--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ

Reply via email to