I am working in Vue3 with Storybook In a component I am using this function
function div_show(id) {
const elements = document.getElementsByClassName("innerright");
for (let i = 0; i < elements.length; i++) {
if (i + 1 != id) {
elements[i].style.display = "none";
}
}
elements[id - 1].style.display = "block";
}
It is working fine when I am using the function in App.vue. When I use this component in Storybook it gives me this error.
Can anyone please help me how can I resolve it.