Advertisement
Geometrian

Untitled

Dec 13th, 2014
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.08 KB | None | 0 0
  1.     <div style="display:none" id="imgglow"><img src="prj14_glow.png"></div>
  2.     <div style="display:none" id="imgcaustic"><img src="prj14_caustic_bgr.png"></div>
  3.  
  4.     <script type="text/javascript">
  5.         function show(id) {
  6.             var element = document.getElementById(id);
  7.  
  8.             element.style.display = "block";
  9.  
  10.             // These function will not exist in the browsers that don't support fullscreen mode yet,
  11.             // so we'll have to check to see if they're available before calling them.
  12.             if (element.mozRequestFullScreen) {
  13.                 //Firefox
  14.                 element.mozRequestFullScreen();
  15.             } else if (element.webkitRequestFullScreen) {
  16.                 //Chrome and Safari.  Both of those browsers are based on the Webkit project, hence the same prefix.
  17.                 element.webkitRequestFullScreen();
  18.             }
  19.         }
  20.     </script>
  21.     <style type="text/css">
  22.         .player:-webkit-full-screen {
  23.             width: 100%;
  24.             height: 100%;
  25.         }
  26.         .player:-moz-full-screen {
  27.             width: 100%;
  28.             height: 100%;
  29.         }
  30.     </style>
  31.  
  32.     <p>
  33.         <button onclick="show('imgglow');">Show Image 1</button><br/>
  34.         <button onclick="show('imgcaustic');">Show Image 2</button>
  35.     </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement