Take a look at:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
If I've understood you're problem, it's a fairly common one that stems from
the fact that you're adding a new element (with append('<li> ...) that has
no click event bound to it. The article linked above has a full explanation
and some good solutions.
- Richard
Richard D. Worth
http://rdworth.org/
On Thu, Jun 5, 2008 at 7:31 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> Hi there,
>
> Please see my example here: http://www.hellobenlau.net/jquery/test.htm
>
> So basically, I want to select a list item from Group A, and when the
> transfer button is clicked, it gets transfered to Group B.
> However, once transferred, the list items in Group B doesn't respond
> to any click function called OUTSIDE of the 'transfer' function.
>
> I"m not sure if i'm explaining it properly, but this is my code:
> $(document).ready(function(){
>
> var temp;
>
> // selecting
> $('li').click(function(){
> $('li.highlight').removeClass('highlight');
> $(this).addClass('highlight');
> temp = $(this).text();
> });
>
> // when transfer link is clicked
> $('#transfer').click(function(){
> $('#groupA li.highlight').remove();
> $('#groupB').append('<li>' + temp + '</li>');
> });
> });
>
> Any help would be extremely helpful!
>
> Thanks!!
>