0

I am getting this error at the line

 $('#' + tsid).find('tr:not(:first)').each(function () {

I checked here, there are no extra commas, or reserved keys that I have used

here's the complete code block

 if ($("#" + tsid).find("tr").length == 0) {
                if (tsid == "Medicaltable") {
                    $("#" + tsid).prepend("<tr class='medicalheader' style='background-color:#D9EEF3;font-weight:bold'><td colspan='11'>Medical Information</td></tr>");
                 //   $("#Medicaltable tr:eq(1)").css("background-color", "rgb(217,238,243)");
                }

                if (tsid == "Vehicletable") {
                   $("#" + tsid).prepend("<tr style='background-color:#9BBB58;font-weight:bold'><td colspan='11'>VEHICLE ACCIDENT DETAILS</td></tr>");
                 //   $("#Vehicletable tr:eq(1)").css("background-color", "rgb(217,228,188)");
                }

                if (tsid == "Thefttable") {
                    $("#" + tsid).prepend("<tr style='background-color:rgb(242,221,220);font-weight:bold'><td colspan='11'>MEDICAL INFORMATION</td></tr>");
                   // $("#Thefttable tr:eq(1)").css("background-color", "rgb(242,221,220)");
                }
            }

              $('#' + tsid).find('tr:not(:first)').each(function () {
                if ($(this).find("td:eq(2)").find(":checkbox").is(":checked")) {
                    $(this).find("td:eq(3)").attr("editable", "false");

               } else {
                    $(this).find("td:eq(3)").attr("editable", "false");
                    $(this).find("td:eq(4)").attr("editable", "true");

                }
            });

        }
6
  • 1
    @JensonMJohn He has tagged IE7 :) Jan 6, 2014 at 14:17
  • which jquery version?
    – A. Wolff
    Jan 6, 2014 at 14:19
  • @sajd The extra curly closing brace is really needed? Jan 6, 2014 at 14:19
  • If i remember it, ':not()' was quite buggy in the past, so maybe just try instead: .find('tr').not(':first') or .find('tr').not(':eq(0)') just in case EDIT: now i think it was :has() which was buggy, but anyway...
    – A. Wolff
    Jan 6, 2014 at 14:20
  • Sorry i forgot to mention its jQuery 1.4.1
    – sajad
    Jan 6, 2014 at 14:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.