[jQuery] bug : Added html not recognized

[jQuery] bug : Added html not recognized

No bug that I can see.
Your function to set up the alert only works on links it can see when it's
run. Move it within the keyup and after the creation of the link and all
works fine. You could easily target just the links within the 'list' div
too.
$(document).ready(function(){
    $("#search").keyup( function(){
        var test = $("#search").val();
        $("#list").html('<a href="#">'+test+'</a>');
        $("#list a").click( function(){
            alert('*');
        });
    });
    
});
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On
Behalf Of David Duymelinck
Sent: 19 July 2006 10:45
To: discuss@jquery.com
Subject: [jQuery] bug : Added html not recognized
Hello,
I'm working with jquery for some time now and and try to keep up with
the changes and bugs but to my recollection i never read about this.
I'm making a kind of autocomplete/suggest. It worked until i wanted to
display the linktext in the searchbox from the generated link list.
So I broke it down as you can see on http://david.icreate.be/jquery.html
. if you input something in the textbox a link appears under the
textbox. If you click on it you should see an alert window with an
asterisk.
I added the test link so you can see what the effect would be.
i tried it with the svn version 130 and with the latest 152.
Is this a bug?
--
David Duymelinck
________________
david@icreate.be
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
This e-mail is confidential to the addressee and may contain privileged
information.
If you are not the addressee you are not permitted to use or copy this
e-mail or its attachments nor disclose same to any third party.
If this has been sent to you in error please notify us as soon as possible.
We reserve the right to intercept and read e-mails sent or received by our
employees.
If you do not wish for your communications to be subjected to such scrutiny,
you should not communicate via this e-mail system.
We endeavour to exclude viruses from our data but it is the responsibility
of the recipient to check any attachments for viruses.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/