I'm attempting to dynamically create a button using JQuery to create the button, initialize it, and insert it into the DOM. When the following code executes, an element is added into the DOM, however instead of being:
<input value="button">Click Me</input>
The item in the DOM is just:
<input>
Not sure why the properties are not being initialized or a complete htlm element is being created.
var list = $("#rootElement").find(".listclass");
var button = $("<input/>", {
type : button,
value : "Click Me"
});
list.append(button)