image2.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>jScrollPane image demo 2</title>
  6. <!-- styles specific to demo site -->
  7. <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" />
  8. <!-- styles needed by jScrollPane - include in your own sites -->
  9. <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" />
  10. <style type="text/css" id="page-css">
  11. /* Styles specific to this particular page */
  12. .scroll-pane
  13. {
  14. width: 100%;
  15. height: 400px;
  16. overflow: auto;
  17. }
  18. img
  19. {
  20. margin: 1em 0;
  21. }
  22. img.portrait
  23. {
  24. width: 480px;
  25. height: 640px;
  26. }
  27. img.landscape
  28. {
  29. width: 640px;
  30. height: 480px;
  31. }
  32. </style>
  33. <!-- latest jQuery direct from google's CDN -->
  34. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  35. <!-- the mousewheel plugin -->
  36. <script type="text/javascript" src="script/jquery.mousewheel.js"></script>
  37. <!-- the jScrollPane script -->
  38. <script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script>
  39. <!-- scripts specific to this demo site -->
  40. <script type="text/javascript" src="script/demo.js"></script>
  41. <script type="text/javascript" id="sourcecode">
  42. $(function()
  43. {
  44. $('.scroll-pane').jScrollPane();
  45. });
  46. </script>
  47. </head>
  48. <body>
  49. <div id="top-nav">
  50. <img src="image/logo.png" width="196" height="69" alt="jScrollPane">
  51. <ul>
  52. <li><a href="index.html">Home</a></li>
  53. <li><a href="index.html#examples">Examples</a></li>
  54. <li><a href="index.html#themes">Themes</a></li>
  55. <li><a href="index.html#usage">How to use</a></li>
  56. <li><a href="faqs.html">FAQs</a></li>
  57. <li><a href="known_issues.html">Known issues</a></li>
  58. <li><a href="index.html#support">Support</a></li>
  59. <li><a href="index.html#download">Download</a></li>
  60. </ul>
  61. </div>
  62. <div id="container">
  63. <h1>jScrollPane - image demo page part 2</h1>
  64. <p>
  65. This demonstration shows how you can avoid the autoReinitialise overhead (as seen in the
  66. <a href="image.html">first image demo</a>) by fixing the width and height of the images inside your
  67. scroll pane.
  68. </p>
  69. <p>
  70. As you can see from the sourcecode for this page, you can set the width and height either through CSS or
  71. using width and height attributes on the image itself.
  72. </p>
  73. <div class="scroll-pane">
  74. <img src="http://farm5.static.flickr.com/4068/4502147230_61d4f18460_z.jpg" class="portrait" alt="Touring" />
  75. <img src="http://farm5.static.flickr.com/4065/4501530717_8a7f9c8ce8_z.jpg" class="landscape" alt="Avalauncher" />
  76. <img src="http://farm5.static.flickr.com/4034/4502145190_d7ae16127b_z.jpg" class="landscape" alt="Rockies" />
  77. <img src="http://farm5.static.flickr.com/4003/4409969018_16cc9d8bf1_z.jpg" width="640" height="480" alt="Paper cranes" />
  78. <img src="http://farm5.static.flickr.com/4064/4407630907_1430d32efa_z.jpg" width="480" height="640" alt="Icecream">
  79. </div>
  80. <h2>Page javascript</h2>
  81. <div id="sourcecode-display">
  82. <p>The contents of this div will be replaced by the javascript added to this page</p>
  83. </div>
  84. <h2>Page CSS</h2>
  85. <div id="css-display">
  86. <p>The contents of this div will be replaced by the CSS added to this page</p>
  87. </div>
  88. </div>
  89. </body>
  90. </html>