JSFiddle - React, Tailwind, and code Playground

by godfrzero

HTML

<input type="text" />
<input type="file" />

JavaScript

jQuery(document).ready(function($) {
    $('input[type="file"]').on('focus', function() {
        var $this = $(this);
        if( $this.val() )
            console.log('Focus triggered!', $this.val());
    });
    
    $('input[type="file"]').on('change', function() {
        var $this = $(this);
        console.log('Change triggered!', $this.val());
    })
});