Hi I have a simple html structure
Title text inner text
What I want is to replace only the te
$("h1").each(function() { var textNode = document.createTextNode("new text"); this.replaceChild(textNode, this.firstChild); });
DEMO: http://jsfiddle.net/FvbJa/