image.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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</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. </style>
  23. <!-- latest jQuery direct from google's CDN -->
  24. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  25. <!-- the mousewheel plugin -->
  26. <script type="text/javascript" src="script/jquery.mousewheel.js"></script>
  27. <!-- the jScrollPane script -->
  28. <script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script>
  29. <!-- scripts specific to this demo site -->
  30. <script type="text/javascript" src="script/demo.js"></script>
  31. <script type="text/javascript" id="sourcecode">
  32. $(function()
  33. {
  34. $('.scroll-pane').jScrollPane(
  35. {
  36. autoReinitialise: true
  37. }
  38. );
  39. });
  40. </script>
  41. </head>
  42. <body>
  43. <div id="top-nav">
  44. <img src="image/logo.png" width="196" height="69" alt="jScrollPane">
  45. <ul>
  46. <li><a href="index.html">Home</a></li>
  47. <li><a href="index.html#examples">Examples</a></li>
  48. <li><a href="index.html#themes">Themes</a></li>
  49. <li><a href="index.html#usage">How to use</a></li>
  50. <li><a href="faqs.html">FAQs</a></li>
  51. <li><a href="known_issues.html">Known issues</a></li>
  52. <li><a href="index.html#support">Support</a></li>
  53. <li><a href="index.html#download">Download</a></li>
  54. </ul>
  55. </div>
  56. <div id="container">
  57. <h1>jScrollPane - image demo page</h1>
  58. <p>
  59. This demonstration shows how jScrollPane can handle it when some slow loading images are included
  60. in the contents of the pane.
  61. </p>
  62. <p>
  63. We use <a href="settings.html#autoReinitialise">autoReinitialse</a> so that the scrollpane automatically
  64. re-calculates the size of it's content if and when it changes. Note that use of this property adds an
  65. overhead to your page and is subject to the same warnings on the <a href="auto_reinitialise.html">auto
  66. reinitialise demo</a> page.
  67. </p>
  68. <p>
  69. If you can it is better to include width and height for each image (either through width and height
  70. attributes or via CSS) in the markup. That way you can avoid the autoReinitialise cost. See
  71. <a href="image2.html">this demo</a> for an example of that approach.
  72. </p>
  73. <div class="scroll-pane">
  74. <img src="http://farm5.static.flickr.com/4068/4502147230_61d4f18460_z.jpg" alt="Touring" />
  75. <img src="http://farm5.static.flickr.com/4065/4501530717_8a7f9c8ce8_z.jpg" alt="Avalauncher" />
  76. <img src="http://farm5.static.flickr.com/4034/4502145190_d7ae16127b_z.jpg" alt="Rockies" />
  77. <img src="http://farm5.static.flickr.com/4003/4409969018_16cc9d8bf1_z.jpg" alt="Paper cranes" />
  78. <img src="http://farm5.static.flickr.com/4064/4407630907_1430d32efa_z.jpg" 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>