Loading operational +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ the parent DOM. hide #container when showing #help-overlay-container and vice verse. I don't need the dark effect and click to go back event handler. see example in ./test-div-slide-in-and-out.html - implementation notes - how to implement a pop up window (overlay)? see ./test-div-overlay.html Loading test-div-slide-in-and-out.html 0 → 100644 +78 −0 Original line number Diff line number Diff line <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <title>test slide in "overlay"</title> <style type="text/css"> #container { width: 700px; margin: 0 auto; border: 1px black solid; } .overlay { display: none; } #overlay1-container { width: 700px; margin: 0 auto; border: 1px red solid; } #overlay1-content { width: 400px; height: 300px; border: 1px blue solid; margin: 20px auto; background: white; padding: 20px; /* box-shadow: 2px 2px 2px blue; */ } #close-overlay1 { position: relative; left: 100px; } #overlay2 { width: 200px; height: 150px; border: 1px red solid; position: fixed; top: 10px; background: white; } </style> </head> <body> <div id="container"> <h3>My Page <a id="show-overlay1" href="#">overlay1</a> </h3> <p>This is the default page content</p> </div> <div id="overlay1-container" class="overlay"> <div id="overlay1-content"> <h3>This is overlay title <a id="close-overlay1" href="#">close</a></h3> <p>This is overlay content</p> </div> </div> <script type="text/javascript" src="vendor/jquery.min.js"></script> <script type="text/javascript"> $('#show-overlay1').click(function (evt) { $('#container').hide(); $('#overlay1-container').slideDown(); return false; }); $('#close-overlay1').click(function (evt) { $('#overlay1-container').hide(); $('#container').show(); return false; }); // page init $('#show-overlay1').click(); </script> </body> </html> Loading
operational +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ the parent DOM. hide #container when showing #help-overlay-container and vice verse. I don't need the dark effect and click to go back event handler. see example in ./test-div-slide-in-and-out.html - implementation notes - how to implement a pop up window (overlay)? see ./test-div-overlay.html Loading
test-div-slide-in-and-out.html 0 → 100644 +78 −0 Original line number Diff line number Diff line <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <title>test slide in "overlay"</title> <style type="text/css"> #container { width: 700px; margin: 0 auto; border: 1px black solid; } .overlay { display: none; } #overlay1-container { width: 700px; margin: 0 auto; border: 1px red solid; } #overlay1-content { width: 400px; height: 300px; border: 1px blue solid; margin: 20px auto; background: white; padding: 20px; /* box-shadow: 2px 2px 2px blue; */ } #close-overlay1 { position: relative; left: 100px; } #overlay2 { width: 200px; height: 150px; border: 1px red solid; position: fixed; top: 10px; background: white; } </style> </head> <body> <div id="container"> <h3>My Page <a id="show-overlay1" href="#">overlay1</a> </h3> <p>This is the default page content</p> </div> <div id="overlay1-container" class="overlay"> <div id="overlay1-content"> <h3>This is overlay title <a id="close-overlay1" href="#">close</a></h3> <p>This is overlay content</p> </div> </div> <script type="text/javascript" src="vendor/jquery.min.js"></script> <script type="text/javascript"> $('#show-overlay1').click(function (evt) { $('#container').hide(); $('#overlay1-container').slideDown(); return false; }); $('#close-overlay1').click(function (evt) { $('#overlay1-container').hide(); $('#container').show(); return false; }); // page init $('#show-overlay1').click(); </script> </body> </html>