Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Index</title>
  6. <style>
  7. .menu {
  8. width: 20%;
  9. height: 25px;
  10. float: left;
  11. padding: 10px;
  12. text-align: center;
  13. background: #fff;
  14. color: #000;
  15. }
  16. .menu:hover {
  17. background: #000;
  18. color: #fff;
  19. }
  20. #content {
  21. clear: both;
  22. background: #e5e5e5;
  23. padding: 0;
  24. overflow-y: scroll;
  25. width: 100%;
  26. height: 600px;
  27. border: 0;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div id="main">
  33. <div id="nav">
  34. <div id="menu1" class="menu">Page 1</div>
  35. <div id="menu2" class="menu">Page 2</div>
  36. <div id="menu3" class="menu">Google</div>
  37. </div>
  38. <iframe src="https://www.facebook.com/" width="x" height="y" frameborder="z" scrolling="no"></iframe>
  39. <iframe id="content" src="http://google.com">iFrames not supported</iframe>
  40. </div>
  41. <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  42. <script>
  43. $(document).ready(function(e) {
  44. $('#menu1').on('click', function(){
  45.  
  46. $('#content').attr('src', 'page1.html');
  47. });
  48. $('#menu2').on('click', function(){
  49. $('#content').attr('src', 'page2.html');
  50.  
  51. });
  52. $('#menu3').on('click', function(){
  53. $('#content').attr('src', 'https://www.facebook.com/');
  54.  
  55. });
  56.  
  57.  
  58. });
  59. </script>
  60. </body>
  61. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement