click event doesn't work in firefox
I've got such a code
- $(document).ready(function () {
$("td").click(function (e) {
var child = $(e.target).attr("id");
var td = $(this).find("span:first").text();
var numberHolder = $(this).find("span:last").attr("id");
var checkbox = $(this).find(".chbx input[type='checkbox']").attr("id");
var clientBlockFlag;
var indx;
if ($("#" + checkbox).is(":checked")) {
indx = $("#<%=DropDownList_pastQuestions.ClientID%> option:selected").get(0).index;
clientBlockFlag = false;
}
else {
indx = $("#<%=DropDownList_pastQuestions.ClientID%> option:last-child").get(0).index;
clientBlockFlag = true;
}
//zmienna boolowska czy chbx is checked
if (!(child.indexOf("chbx") >= 0)) {
if ($.trim(td) !== '') {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-3",
data: "{_word: '" + $.trim(td) + "', clientBlockFlag: '" + clientBlockFlag + "' }",
url: "bingo.aspx/getCellID",
dataType: "json",
success: function (msg) {
var anwser = msg.d;
if (!(anwser.indexOf("-1") >= 0)) {
getID(anwser, td);
$("#" + numberHolder).text(indx);
}
}
});
}
$("#" + checkbox).attr("checked", false);
}
});
});
My problem is click event works in Explorer and Chrome but not in Firefox. Can anybody tell me what i'm doing wrong?
Cheers,
Tomek