I have a custom attribute i added to my html doc, and accordingly defined it at the top of the page.
The thing that confuses me is that even though i assign it to an object, when the object is created, it is entirely in lower case. I am not sure why. Example below:
var inputControlType = ""
var n = $("<div class = 'draggable' style='position:absolute;'>");
n.attr("id", "layer" + $('div#divControls').children().length + "new");
n.hide();
inputControlType = "checkbox";
var inputControls = $("<input type = '" + inputControlType + "' />");
inputControls.attr("id", "el" + $('#divControls').children().length + "new");
inputControls.attr("disabled", "true");
inputControls.css("font-family", "Microsoft Sans Serif");
inputControls.css("font-size", "12pt");
n.attr("elType", "3");
n.html("<span>" + inputControls.clone().wrap('<p>').parent().html() + "<label for='" + $('div#divControls').children().length + "new' style='font-size: 12pt; font-family: Microsoft Sans Serif;'>Default Text</label></span>").appendTo($("#divControls"));
in the code above you see --n.attr("elType","3");-- but when i inspect it in the markup, it is eltype="3". This is not good as then elType is undefined.
markup:
<div style="left: 665px; top: 183px; display: block; position: absolute; cursor: move; background-color: pink;" id="layer37new" class="draggable ui-draggable" context="menuOne" menuid="el37new" eltype="3">
<span>
<input style="font-family: Microsoft Sans Serif; font-size: 12pt; cursor: move;" id="el37new" disabled="disabled" value="on" type="checkbox" context="menuOne" menuid="el37new">
<label style="font-family: Microsoft Sans Serif; font-size: 12pt;" for="37new">
Default Text
</label>
</span>
</div>
Did i do something wrong such that is prints eltype instead of elType? ALSO: no, changing my reference of the attribute from elType to eltype is not a valid answer. I just dont understand why it would not act the way it was written.