I am adding new elements to the DOM using a utility function which is contained below.
HtmlCore.prototype.createElement = function(tag, attrs, css, value){
return $("<" + tag + ">", attrs).css(css).val(value);
};
For some reason the new element doesn’t receive the value, when I append it to the DOM. Any thoughts?
You can set value only to input elements. If you are trying to set the values for non input elements then it will not work.