Код: Выделить всё
$('.inp-1').focusout(function() {
$(this).closest(".inp-2").css({
"background": "green",
"border": "2px solid red"
});
});Код: Выделить всё
.inp-2 {
background: red;
}Код: Выделить всё
Input 1
Input 2
Input 1
Input 2
Подробнее здесь: https://stackoverflow.com/questions/363 ... sest-class
Мобильная версия