javascript - Add style to child element inside target -
currently have script adds display:block
target element matching id.
document.getelementbyid(id).style.display = 'block';
...but want change add's style or class child div element.
you can grab child element using javascript code:
document.getelementbyid(id)[0].style.display = 'block';
it's accessing item inside of array.
Comments
Post a Comment