On 7/31/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
>
> plewas wrote:
> > Why, when i click link id =a (hello2) from body document, alert is
> > appired on screen, but when i click link id=a (heloooo) which was
> > appened by $("#b").click( function() (hello1) allert is not apper?
> >
> > Any solution?
> >
> > Best reagards
> > plewas
>
> At the time you try to add the click listener to #a, that element
> doesn't exist yet in the DOM tree. You need to add the listener after
> you've added that element to the document.
>

Also, don't forget that ids should be unique. You already have one a#a and
you're appending another one. A longer answer (including another option -
the behavior plugin) can be found here:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F

- Richard

Reply via email to