remove li from ul javascript code example
Example 1: js remove li from ul
var myList = document.getElementById('myList');
myList.innerHTML = '';
//Or with jQuery:
$('#myList').empty();
Example 2: remove parent element javascript
node.parentNode.parentNode.removeChild(node.parentNode)