I have written the following line in Javascript:
var eleCategory = document.getElementById("cmbCategory");
Now I want to find all elementbyClassName contained in the eleCategory element.
Is it possible with something like this?
var eleChild = eleCategory.getElementByClassName("autoDropdown");
How can I get the child element of the parent element?
getElementsByClassNamehasn’t been implemented in all browsers. Niels’ solution, for instance, doesn’t work in IE. However, others have created their own implementation; John Resig has a write-up on his blog