How can I remove the text using jQuery or javascript -
this question has answer here:
i can't think syntax remove text highlighted in yellow. picpanel div gets cleared when try access main panel
var parent = document.getelementbyid('ct100...'); parent.removechild(parent.firstchild);
here's fiddle: http://jsfiddle.net/9b36k/
if want make sure you're removing text node if it's there (and not accidentally removing else when it's not there) use this:
var parent = document.getelementbyid('ct100...'); var child = parent.firstchild; child.nodetype == 3 && parent.removechild(child);
Comments
Post a Comment