1.4.2 breaks selection
1.4.2 breaks selection
Hi,
I have the following that works in jquery 1.3.2, but is not working in 1.4.2.
- $(document).ready(function() {
- $("#selectAll").click(function() {
- if($("#selectAll").is(":checked")) {
- $("#checkboxColumn :checkbox:enabled").attr("checked",true);
- }
- else {
- $("#checkboxColumn :checkbox:enabled").attr("checked",false);
- }
- });
The html page is like the following:
- <table>
- <tr><td><span id="checkboxColumn"><input type="checkbox" ... /></span></td></tr>
- <tr><td><span id="checkboxColumn"><input type="checkbox" ... /></span></td></tr>
- <tr><td><span id="checkboxColumn"><input type="checkbox" ... /></span></td></tr>
- ...
- </table>
The expression $("#checkboxColumn :checkbox:enabled") would select all the checkboxes with 1.3.2.
But with 1.4.2 only the first checkbox got selected.
Is there something illegal in the html? I inherited these codes. I would have place the id="checkboxColumn" at the <table> level, and I would select based on class rather than id as well.
Thanks in advance,
Yee