The jQuery overload for creating an HTML element and supplying a map of properties does not seem to work for controls. I saw in the documentation that IE does not allow you to change the type so you have to specify that, but it seems to ignore everything in the properties map in IE and Chrome:
$("<input type='text'>", {
id: "foo",
name: "foo",
value: "test"
}).appendTo("body");
Is creating the following element:
<input type="text" />
JSFiddle demonstrating the behavior: http://jsfiddle.net/JyvBh/
You will need to add the type as part of the other attributes and it will work; like this:
EDIT: Suportted Workaround According to jQuery Docs
According to the jQuery docs the workaround actually uses a different format as below:
Updated JSFiddle including both methods above.
I hope this helps!