I have a collection that has student details (name, age, etc). Parents can update the students details.
I want to be able to change the color of the field when they have typed something in.
I have this working for normal fields...
$(document).ready(function(){ var manuallyFocused = false; $('#q54 input').on('focus',function(){ manuallyFocused=true;}); $('#q54 input').on('blur',function(){ manuallyFocused=false;}); $('#q54 input').on('change',function(){ if (manuallyFocused) { $('#q54 input').css('background','#ffff99'); } else { $('#q54 input').css('background','none'); } }); });