JSFiddle - React, Tailwind, and code Playground

HTML

<label class="required">Company Name</label><input type="text" name="companyname" id="companyname" />
<div class="field-hint" id="hintCompanyname">Invoice to this name</div>

<label class="required">Address</label><input type="text" name="address"  id="address" />
<div class="field-hint" id="hintAddress">Eg. New York, 6th ave 4.</div>

JavaScript

function capFirstLetter(string) {
           return string.charAt(0).toUpperCase() + string.slice(1);
        }

        function pairFieldHint(fieldName) {
           hintField = $('#hint' + capFirstLetter(fieldName));
           fieldName = $('#' + fieldName);
           hintField.toggle();
           fieldName.focus(function () {
              hintField.show('fast');
           });
           fieldName.blur(function() {
              hintField.hide('fast');
           });
        }

        pairFieldHint('companyname');
        pairFieldHint('address');