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 enter image description here

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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -