Displaying 1 result from an estimated 1 matches for "document_el".
Did you mean:
document_id
2007 Aug 20
3
Contribution on extending createElement
...eateElement(''div'');
var my_anchor = document.createElement(''a'');
my_anchor.setAttribute(''href'',my_link);
var my_text = document.createTextNode(''here is my link'');
my_anchor.appendChild(my_text);
my_div.appendChild(my_anchor);
$(document_element).appendChild(my_div);
... I guess you see what I''m talking about !
Back a few months, I wrote a function that would do all that in a one-
liner. Since then, I''ve discovered Prototype so I rewrote my function
in a more prototype-ish fashion :
function _(element) {
var arg...