I have something like below
<div id="contributors_div">
<div id="arrow-up"></div>
</div>
I am populating contributors_div
with some text(data) on different anchor clicks. My <div id="arrow-up"></div>
has image of an arrow which has to be shown.
Below is how i am populating the div (or say overwriting)
var ul_data = "";
for ( var i = 0; i < CONTRIBUTORS.length; i++) {
ul_data = ul_data + "<li><h3>" + CONTRIBUTORS[i] + "</h3></li>";
}
$("#contributors_div").html(ul_data);
But this is removing the arrow as well. When i useappend
, my old data also gets appended which is not as desired. Can anyone tell me the correct way.
Thanks