JQuery 1.3.1 doesn't find dynamically generated rows

Posted by Bamelis Steve on Stack Overflow See other posts from Stack Overflow or by Bamelis Steve
Published on 2009-03-13T09:37:21Z Indexed on 2010/05/01 22:37 UTC
Read the original article Hit count: 130

Filed under:
|
|

I have just installed in the ASP.NET MVC RC2 and with that also using the JQuery 1.3.1 library.
Before I was using the 1.2.6 library.
Our application works fine under that library.
But now I have strange problem.
We have a grid view that we build up with the result of an AJAX call.
With the result returned we add new rows to a table through cloning a hidden row.

The generated HTML from the JQuery is placing extra parameters to the tags. These are in the form of JQuery12345678="null". They all have the same name. In the head of the table there is a checkbox that selects/unselects all the rows of the table. This by iterating through the rows of the table.

$("#selectAllCheckbox").click(function() {
    var checked = this.checked;
    $("#dgNewTasks tbody tr").find(':input[type="checkbox"]').each(function() {
        this.checked = checked;
    });
});

Now by using the new library the check box are no longer set. I have used IE Developer Tools to check the HTML. If I remove the JQuery12345678="null" parameter from my rows. It works fine.

Could someone tell me what I have to do?

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about jQuery