Modifying HTML Elements.
Page 1 of 1
Modifying HTML Elements.
I know you can create elements with .createElement/.appendChild, and that you can delete them with .removeChild, but if I wanted to edit a text node what would it look like? Would I have to delete the old node and make a new one?Re: Modifying HTML Elements.
I suppose so, just delete paragraph and add text input with JQuery animations, maybe...Re: Modifying HTML Elements.
no you just need to replace inner html of the element :)i.e
$("div").html("<span class='red'>Hello <b>Again</b></span>");
Page 1 of 1