$scope.add = function(){
$(".showdetailsadd input").each(function () {
console.log( $(this).parent().find(".colr").length == 1 && $(this).val() == "" )
if ($(this).parent().find(".colr").length < 1 && $(this).val() == "") {
nonull = $(this).siblings().find("span").eq(0).text();
console.log(nonull);
return false;
}
})
if (nonull) {
console.log(nonull);
$scope.XHRmessage_show = nonull + "";
$scope.message_show_f = true;
$timeout(function () {
$scope.message_show_f = false;
}, 2000)
return false;
}
}
Why do you enter the if ($(this). Parent (). Find (".colr"). Length < 1 & & $(this). Val () = = ")
condition, already return
, but still enter the if (nonull)
condition,
look forward to the boss"s guidance