javascript - collapse spread not disappear after dialog hidden -


i made modal dialog css:visibility hidden , visible.

<div id="mymodal">   <a data-toggle="collapse" href = "#spread">     <span class = "caret"></span>spread   </a>   <div id = "spread" class = "panel-collapse collapse">    ...   </div> </div> <button onclick = "hidemodal()">hide modal</button> 

javascript code

hidemodal(){ var modal = document.getelementbyid("mymodal"); modal.style.visibility = "hidden"; } 

all things working menu collapse not working well. if open menu , hide dialog things disappear spread not disappear.
there have met kind of issue?

your problem in line

modal.style.visibility = "hidden"; 

in experiment question, visibility collapse override visibility hidden.

solution change hidemodal() content to

$('#mymodal').addclass("hidden"); 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -