jQuery addClass example

Change class name on click in jQuery

HTML

<input id="file" type="file">

JavaScript

$('#file').change(function(){
var name = $(this).val;
$(this).text(name);
})