JSFiddle - React, Tailwind, and code Playground

HTML

<input id="disabled" class="test" type="text" disabled="disabled" />
<input id="VisibilityNone" class="test" type="text" style="visibility:hidden" />
<input id="displayNone" class="test" type="text" style="display:none" />
<input id="jQuerHide" class="test jqHide" type="text" />
<ul id="errors"></ul>

JavaScript

$(function() {
    var inputs = $('.test'),
        errors = $('#errors');
    
    $('.jqHide').hide();
    
    for (i = 0; i < inputs.length; i++) {
        try {
            $(inputs[i]).trigger('focus');
        }catch (e){
            errors.append($('<li/>').text(inputs[i].id + ": " + e.toString()));
        }                   
    }
});