How do I replace a list of li in a div with another list of li in the same div? I tried this:
$("#divList").empty();
$('#divList').append('<li>' + textValue + '</li>');
I want to clear out all data that was originally in the div and replace data using the same div at the same margin-left and margin-top as first list of li.
In my code, the div is emptied, but the li is not appended.
Grab the new lists html and then replace it : http://jsfiddle.net/bikerabhinav/V6g8d/