I am appending li in a ul using the following code:
li
ul
for (var i = 1; i <= len; i++) { li = document.createElement(\'li\');
$('#button').on('click', function() { $(root).empty(); });