enabled_wide_container.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <title>Lazy Load Enabled on Horizontal Container</title>
  6. <meta name="generator" content="Mephisto" />
  7. <link href="http://www.appelsiini.net/stylesheets/main2.css" rel="stylesheet" type="text/css" />
  8. <link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/tuupola" title="Atom feed" />
  9. <style type="text/css">
  10. #sidebar {
  11. width: 0px;
  12. }
  13. #content {
  14. width: 800px;
  15. }
  16. #container {
  17. width: 800px;
  18. overflow: scroll;
  19. }
  20. #inner_container {
  21. width: 4750px;
  22. }
  23. </style>
  24. <script>
  25. var _gaq = _gaq || [];
  26. _gaq.push(['_setAccount', 'UA-190966-1']);
  27. _gaq.push(['_trackPageview']);
  28. _gaq.push(['_trackPageLoadTime']);
  29. (function() {
  30. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  31. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  32. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  33. })();
  34. </script>
  35. </head>
  36. <body>
  37. <div id="wrap">
  38. <div id="header">
  39. <p>
  40. <h1>Lazy Load</h1><br />
  41. <small>Image lazy loader plugin for jQuery.</small>
  42. <ul id="nav">
  43. <li id="first"><a href="/" class="active">weblog</a></li>
  44. <li><a href="/projects" class="last">projects</a></li>
  45. <!--
  46. <li><a href="/cv" class="last">cv</a></li>
  47. -->
  48. </ul>
  49. </p>
  50. </div>
  51. <div id="content">
  52. <h2>Plugin enabled on horizontal container</h2>
  53. <div class="entry">
  54. <p>
  55. Images right of the visible area are not loaded. When scrolling left they are loaded when needed.
  56. Shift-reload to test again. Compare this to page where plugin is
  57. <a href="disabled.html">disabled</a> or page with
  58. <a href="enabled_gazillion.html">gazillion images</a>.
  59. </p>
  60. <code>
  61. <pre>
  62. $("img").lazyload({
  63. container: $("#container")
  64. });</pre>
  65. </code>
  66. <div id="container">
  67. <div id="inner_container">
  68. <img src="img/grey.gif" data-original="img/bmw_m1_hood.jpg" width="765" height="574" alt="BMW M1 Hood">
  69. <img src="img/grey.gif" data-original="img/bmw_m1_side.jpg" width="765" height="574" alt="BMW M1 Side">
  70. <img src="img/grey.gif" data-original="img/viper_1.jpg" width="765" height="574" alt="Viper 1">
  71. <img src="img/grey.gif" data-original="img/viper_corner.jpg" width="765" height="574" alt="Viper Corner">
  72. <img src="img/grey.gif" data-original="img/bmw_m3_gt.jpg" width="765" height="574" alt="BMW M3 GT">
  73. <img src="img/grey.gif" data-original="img/corvette_pitstop.jpg" width="765" height="574" alt="Corvette Pitstop">
  74. </div>
  75. </div>
  76. </div>
  77. <div id="sidebar">
  78. </div>
  79. <div id="footer">
  80. </div>
  81. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" charset="utf-8"></script>
  82. <script src="jquery.lazyload.js?v=1.8.3" charset="utf-8"></script>
  83. <script type="text/javascript" charset="utf-8">
  84. $(function() {
  85. $("img").lazyload({container: $("#container")});
  86. });
  87. </script>
  88. </body>
  89. </html>