When I begin writing text in the textarea, I want the outer div, with a class box, to have it\'s border turned solid instead of dashed, but somehow the :focus doesn\'t apply
Simple use JQuery.
$(document).ready(function() {
$("div .FormRow").focusin(function() {
$(this).css("background-color", "#FFFFCC");
$(this).css("border", "3px solid #555");
});
$("div .FormRow").focusout(function() {
$(this).css("background-color", "#FFFFFF");
$(this).css("border", "0px solid #555");
});
});
.FormRow {
padding: 10px;
}
First Name:
Last Name:
- Click an input field to get focus.
- Click outside an input field to lose focus.