JSFiddle - React, Tailwind, and code Playground
http://stackoverflow.com/questions/36322449/how-to-get-back-focus-after-tab-pressed-using-jquery/36322629#36322629
by Jihwan Kim
HTML
<div id="test">
<input class="usdrate">
<input class="usdcost">
</div>
JavaScript
$(document).on("change", '.usdrate,.usdcost', function () {
updateinputs();
if($(this).attr('class') == 'usdrate'){
//not working
$('.usdcost').focus();
}
});
function updateinputs(){
//I create new inputs because I changed the values
//there are many operations here
$("#test").html('').html('<input class="usdrate"><input class="usdcost">');
}