PDA

View Full Version : Element.remove()



thejoker101
18 Oct 2006, 6:38 AM
It's easy enough to do, I'd just like to see it in Jack's UI extensions.

Something like:


$(id).parentNode.removeChild($(id));

Forgive me if it's already in there, but I didn't happen to notice it.[/code]

jack.slocum
18 Oct 2006, 7:05 AM
Good suggestion. I added it like this:



remove : function(){
this.dom.parentNode.removeChild(this.dom);
delete YAHOO.ext.Element.cache[this.id];
}