r/javaScriptStudyGroup • u/Really-a-dolphin • Jan 29 '18
How do i display all the elements in a parent element?
I can display a single element
var x = document.body.style.backgroundImage ; alert( 'alert! ' + x);
//but cant work out how to display for example all the elements in style
var x = document.body.style ; alert( 'alert! ' + x);
//doesn't work just give [object CSS2Properties]
1
Upvotes
1
u/Volv Jan 29 '18
https://codepen.io/volv/pen/BYaGNJ?editors=1011