14 lines
365 B
JavaScript
Executable File
14 lines
365 B
JavaScript
Executable File
export default function($) {
|
|
$.fn.trackFileNames = function() {
|
|
$(this).each(function() {
|
|
$(this).children('input[type=file]').change(function() {
|
|
$(this).next().html(this.files[0].name);
|
|
});
|
|
});
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
$('[data-track-file-names]').trackFileNames();
|
|
});
|
|
};
|