JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
JavaScript
$(document).on('change', '.maintCostField', function(){
console.log('hello');
alert('test');
});
$('div').append('<input class="maintCostField" type="text"/>');