Здесь я создаю массив:
var optionTexts = [];
$('#stripeMeSubSubCat tr').each(function(){
if ($(this).find('input:checkbox.subsubcat_chkclass:not(:checked)').length == 0)
{
subsubrow_cat_id_no = parseInt($(this).closest("tr").attr("id"));
optionTexts.push(parseInt(subsubrow_cat_id_no));
};
});
Приведенный ниже код работает только при включенном предупреждении.Я читал, что это может быть связано с проблемой синхронизации.Есть ли решение в отношении кода ниже?Спасибо.
$('#stripeMeSubSubCat tr').each(function(){
myindex = parseInt($.trim($(this).closest("tr").attr("id")));
if (jQuery.inArray(myindex, optionTexts) == -1) {
var equal="FALSE";
}else{
var equal="TRUE";
$("#stripeMeSubSubCat tr[id='" + myindex + "'] input").attr('checked', true);
};
//alert(equal);
});