javascript - Replace Text in a Div with text in another Div -
<div id="replaceme">i'm girl</div> <div id="iamreplacement" style="display:none">no boy girl</div>
the text in replaceme
should replaced text in iamreplacement
i think can done in java script or jquery.. can 1 me on this..
tried (not working)
<script> jquery('#replaceme').replacewith(jquery('#iamreplacement')); </script>
try jquery:
$("#replaceme").html($("#iamreplacement").html());
or pure javascript:
document.getelementbyid("replaceme").innerhtml = document.getelementbyid("iamreplacement").innerhtml;
Comments
Post a Comment