jQuery Event handling Forms JavaScript Selectors Public



The createProductCodeForm function is used to create a new form that accepts a product code from a user.

The current version of the form contains the hint: 'The product code can be found on the label'. This hint is currently always visible to the user.

Improve the form so that the hint is only rendered when the input element is the focused element.

ECMAScript 5.1, jQuery v3.1.1 (available as $)

  •   Hint is not visible: Wrong answer
  •   Focus shows hint: Wrong answer
  •   Unfocusing hides hint: Wrong answer