Witam forumowiczów, mam problem z tym oto kodem:
for (var i = 1; i < 9; i++) {
var countChecked = function () {
for (var i = 1; i < 9; i++) {
var countChecked = function () {
var n = $("input.rzad[i]:checked").length;
$("div#iloscDamian").text(n);
};
countChecked();
$("input[type=checkbox]").on("click", countChecked);
}
$("div#ilosc").text(n);
};
countChecked();
$("input[type=checkbox]").on("click", countChecked);
}
Problem polega na tym że w instrukcji
var n = $("input.rzad[i]:checked").length;
rzad jest moja klasa, a te klasy różnią się tylko tą liczbą.