I am trying to expand toggle class using JavaScript but its not working, i am using setAttribute('aria-expanded', 'true') its giving error set-attribute is null.
(document.getElementById("collapseid")as HTMLTextAreaElement).setAttribute('aria-expanded', 'true')
How can we expand the toggle area with div id using JavaScript and without use of click. i am not sure set attribute will solve the issue, i tried to set the attribute true using Edit Html option but it dint work. unless i click on the toggle button its not expanding, please let me know how to achieve this