I cant figure out, why this code does not work as expected:
var $obj = jQuery('<div>xx<input type="text" value="" />xx</div>');
$obj.find('input').val('testing');
console.log($obj.html());
The resulting output is without any change - i.e. no change in value. But append()
and other functions works fine. What could be wrong?