I was under the impression that "val()" should be used for input element and "text()" should be used for all other elements.
However, when I do the following:
$("<input/>").val("test")
I get
[<input>]
and when I go the following:
$("<input/>").text("test")
I get
[<input>test</input>]
The latter is what I'm looking for.
Is there something different when using jquery to create an element that I'm missing? My actually situation is much more complex than this, but I simplified it for the purpose of this question.