JQuery 1.3.1 doesn't find dynamically generated rows
- by Bamelis Steve
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?