First of all, I'm using this function:
jQuery(document).on('propertychange change click keyup input paste', 'input[name="wager_id_111"]', function(){
var thisValue = jQuery(this).val();
var amountReal = jQuery('.amount_visible');
if ( thisValue != '' ){
var amount_in_btc = thisValue / 1000;
amount_in_btc = amount_in_btc.toFixed(5);
amount_in_btc = parseFloat(amount_in_btc);
amountReal.show(1, function(){
amountReal.find('span').html('= ' + amount_in_btc);
});
} else {
amountReal.hide();
}
});
and it works when user types amount it the input. The problem is, when input value is being changed via code, so I can't detect it was changed. Becouse there is buttons how much amount add to input (like 1, 10, 50, 100) and when users selects one of those, input value is being changed jQuery('input[name="wager_id_111"]').val(newVal); but as I said the function I showed below can't catch this. What the option would be to make it work?
Fiddle: