When I make the call to this particular function, the following code is executed:
el=DOM.create({tag:"div",css:{backgroundColor:"#000000",color:"green"},html:"abc"});
$("#fb_dv").append(el);
This is where my function resides:
DOM={
create:function(data){
if(data.tag){
d=document;
doc=d.createElement(data.tag);
for(var v in data){
if(v=="css"){
for(key in data[v]){
prop=doc.style;
prop.key=data[v][key]
}
}
if(v=="html"){
doc.innerHTML=data[v]
}
}
return doc;
}
}
}
The issue at hand is that it seems this function isn't correctly applying the specified css properties.