jquery - How to clear content div and reappear with javascript -


i using jquery custombox modal. have working fine want div behind (but not background image) disappear when modal clicked. have managed that, not sure on code make reappear again after modal closed. @ moment have refresh page in order come back.

here code using far: http://codepen.io/doolz77/pen/esohb/

i have not included modal due amount of code, however, here link actual page

to make modal appear click on 'joey' link.

thanks!

edit: @ moment controlled jquery. call placed in footer is:

<script> $(function () {     $('#fadein').on('click', function () {     $.fn.custombox( {     effect: 'fadein'     });     return false;     }); }); </script> 

this fades modal in , out. need place code here #wholepagecontainer div re-appear??

you need store html before deleting retrieve later. or can use show/hide reduce pain , achieve desired functionality:

function clearbox(wholepagecontainer) {  document.getelementbyid(wholepagecontainer).style.display = "none"; } function showbox(wholepagecontainer) {  document.getelementbyid(wholepagecontainer).style.display = "block"; } 

demo


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -