javascript get first child element
snippet in javascript

javascript get first child element

user1817

var x = document.getElementById("myList").firstChild

how to add first child using js

user3501

var eElement; // some E DOM instance
var newFirstElement; //element which should be first in E

eElement.insertBefore(newFirstElement, eElement.firstChild);