I would know if this is a bug... When I alert html content from #test, I get :
<input name="sum" value="" type="text">
whereas it was set to 55 just before the alert, and I can view it on the brower.
Can you tell me why ? :-)
<div id="test">
<input type="text" name="sum" value="">
</div>
<script language="javascript">
$(document).ready(function() {
$("#test").find("input[name='sum']").val(55);
alert($("#test").html());
});
</script>