I have a problem on my website. I have a <div id="test">
which is display:none
by default.
Now, when I click on the button it changes to display:block
, but in my div a popup is displayed which disappears when I make a click.
So I need to simulate a click so that the another div does not show.
I tried :
<script>
document.getElementById('test').setAttribute('class','display-block');
document.getElementById('test').click();
</script>
But it does not work.