Basically I have a form and when it’s submited I add a class to blank fields to highlight them to be filled.
However when the user starts to fill an input or changes a “select” I want to remove this class.
This is what I’m trying, my problem is that I don’t know how to select just the element that has been modified. How can I do this?
$("input, select").change(function(){
$('input').removeClass('highlight'); // Only affect modified element
});
You could use
$(this)I guess: