I'm working on a simple code where I need to change the outline color when a user clicks on a text field.
<input type="text" id="box1" />
<input type="password" id="box2" />
<input type="email" id="box3" />
<input type="submit" id="sub" value="submit" />
I don't know how to achieve this. My idea involves using jQuery to adjust the outline color and add a box shadow for a better visual effect:
$(document).ready(function(){
$(#box1).click(function(){
$(this).css('outline-color','#00BFFF').css('box-shadow',' 0px 9px 0px rgba(0, 161, 214,1)')
});
});
I've been stuck trying to figure this out since last night and could use some guidance on whether my approach is correct.