PDA

View Full Version : extend Toolbar.TextItem class



Yaya
10 Sep 2008, 12:37 PM
Hi

Can someone tell me what the last line means:

var s = document.createElement("span");
s.className = "ytb-text";
s.innerHTML = t.text ? t.text : t;
Thanks in advance

mdissel
10 Sep 2008, 12:43 PM
If t.text is declared use t.text else use t and assing it to the innerHTML

Yaya
10 Sep 2008, 12:45 PM
Thanks,mdissel. It seems like very simple:">