Reason is you used value
attribution,it does not change with typed text value, so try this it will change according to user entered input
$('.input1').keyup(function () {
console.log('changed');
if ($('.input1').val() == "a") {
$(this).attr('value',$(this).val()) // this line will change value
var source = $('#input_wrapper').html();
alert(source);
}
});