This question would be better suited to the main jQuery list

http://groups.google.com/group/jquery-en

as it doesn't relate to a jQuery UI plugin. Thanks.

- Richard

On Thu, Sep 24, 2009 at 10:51 AM, dattu <[email protected]> wrote:

>
> Hi,
>
> I am facing one problem In jquery. For easy understanding, below html
> code created.
>
>
> Before clicking on CHANGE label if click on 12345, I am getting
> hiiiiiii alert message.
> After clicking on CHANGE I am not getting alert message.(I am
> experting hiiiiii should come on click of 67890 also).
>
> code sample
>
> <html>
> <head>
>  <script src="http://code.jquery.com/jquery-latest.js";></script>
>
>  <script>
>  $(document).ready(function(){
>  $('#change').click(function(){
>  $('#div1').empty();
>  $('#div1').append('<table><thead><th>NEW TEST</th></
> thead><tbody><tr><td>67890</td></tr><tr><td>EFGHI</td></tr></tbody>');
>        });
> $("tbody tr").click(function(){
>                alert("hiiiiiiiiii");
>        });
>
>
>  });
>  </script>
>
> </head>
> <body>
>  <div id="div1">
>                <label id="change">CHANGE</label>
>    <table>
>                <thead>
>                <th>
>                        TEST
>                </th>
>                </thead>
>                <tbody>
>                <tr>
>                        <td>12345</td>
>                </tr>
>                <tr>
>                        <td>ABCD</td>
>                </tr>
>                </tbody>
>  </div>
> </body>
> </html>
>
>
>
> NOTE:- If i change like below it is working.
>
> $(document).ready(function(){
>  $('#change').click(function(){
>  $('#div1').empty();
>  $('#div1').append('<table><thead><th>NEW TEST</th></
> thead><tbody><tr><td>67890</td></tr><tr><td>EFGHI</td></tr></tbody>');
>
> $("tbody tr").click(function(){
>                alert("hiiiiiiiiii");
>        });
>
>        });
>  });
>
> 1) Please explain why this is not behaving as experted.
> 2) In case of NOTE (see at last) change, why it is working?
> 3) how can I slow this issue
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to