Simple example of jquery implementation of input box getting focus


Get a simple example of a form focus discoloration

//.login-form Form style class
//.item input Input box parent div
// focus Is the style class to add
    $(".login-form").on("focus", "input", function(){
      $(this).closest('.item').addClass('focus');
    }).on("blur","input",function(){
      $(this).closest('.item').removeClass('focus');
    });

// Initializes the selected user name input box
$("#itemBox").find("input[name=username]").focus();