I'm currently exploring a way to add an event listener in my script.
Here's the variable I have:
var inputs = data.context.find(':input').not(':button');
Following that, I have a FOR loop where I utilize this variable to append a CSS class to certain fields:
inputs[i].className += " invalidEntry";
This method works without any issues.
However, what I aim to achieve is to also associate an event handler with these fields. This event handler should remove the mentioned CSS class whenever the values in those fields are changed.
My question then becomes - how can I attach an event listener to `inputs[i]` within the FOR loop?