fmsu9313 fmsu9313
  • 28-07-2017
  • Computers and Technology
contestada

Find an element inside a div using javascript

Respuesta :

tonb
tonb tonb
  • 28-07-2017
You want to find it based on what? Here's a solution if you want to find it based on id:

function GetElementInsideContainer(containerID, childID) {
   var elm = document.getElementById(childID);
   var parent = elm ? elm.parentNode : {};
   return (parent.id && parent.id === containerID) ? elm : {};
}

Answer Link

Otras preguntas

find the next two terms in the sequence. 40, 10, –20, –50, . . . a. –70, –90 b. –70, –100 c. –80, –110 d. 60, 80
Using the rules for special cases, what is the result of (-2x+2)^2
Are there any songs that I can play on flute or picc that'll make me sound like a bird?
When adding a suffix that begins with a consonant, the general rule is to A. change the last letter of the word to y and then add the suffix. B.
Describe the location and importance of cilia and mucus in the respiratory system.
f(x) g(x) h(x) j(x) Jesse got $5 from his dad and he makes $2 each time he walks the neighbor's dog. x g(x) –2 –1 2 –9 6 –17 a line going through the point (0,
solve the inequality. x/3 is greater than or equal to - 6. a. x ≥ –9 b. x ≥ 9 c. x ≥ –18 d. x ≤ –18
Tim has prepared the following thesis statement for his essay on Shakespeare’s Romeo and Juliet: Although Juliet’s actions may be interpreted as rushed and imma
Physical fitness involves the proper functioning of which body systems?
The quotient of negative Eight and the sum of a number and three