get a span inside a div with div id javascript code example
Example: get a span inside a div with div id javascript
var toggle = document.getElementById('status_toggle'+index);
toggle.getElementsByTagName('span')[0].style.background = '#2dce89';
var toggle = document.getElementById('status_toggle'+index);
toggle.getElementsByTagName('span')[0].style.background = '#2dce89';