I’m trying to affect only elements inside the submitted form (this). This is what I’m trying right now:
$("form").submit(function (e) {
$(this + '[name="field"]').addClass('fill-field');
});
I also tried:
$(this).filter('[name="birthday[day]"]').addClass('fill-field');
$(this).is('[name="birthday[day]"]').addClass('fill-field');
How can this be done?
Use
.find()