Guest User

Untitled

a guest
Aug 8th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. <body style="font-family: Arial, Sans-serif, sans;">
  2.  
  3. <!-- this will work with any number of images -->
  4. <!-- set the active class on whichever image you want to show up as the default
  5. (otherwise this will be the last image) -->
  6.  
  7. <h2>Top 10 Vechicles Among US-Hispanics</h2><br />
  8.  
  9.  
  10. <div id="slideshow">
  11. <div class="active">
  12. <img src="img/banner01.jpg" alt="Toyota Corolla" /></a>
  13. <br><strong>1. Toyota Corolla</strong><br>
  14. The 2013 Toyota Corolla is a study in practicality and stylish engineering.
  15. </div>
  16.  
  17. <div>
  18. <img src="img/banner02.jpg" alt="Honda Civic" /></a>
  19. <br><strong>2. Honda Civic</strong><br>
  20. The Honda Civic, a longtime favorite sedan among fuel-conscious drivers.
  21. </div>
  22.  
  23. <div>
  24. <img src="img/banner03.jpg" alt="Honda Accord" /></a>
  25. <br /><strong>3. Honda Accord</strong><br>
  26. The 2013 Honda Accord proved to be popular with drivers and professional reviewers.
  27. </div>
  28.  
  29. <div>
  30. <img src="img/banner04.jpg" alt="Toyota Camry" /></a>
  31. <br /><strong>4. Toyota Camry</strong><br>
  32.  
  33. The Toyota Camry is one of the best-selling vehicles of all time.
  34. </div>
  35. <div>
  36. <img src="img/banner05.jpg" alt="Ford F-Series" /></a>
  37. <br /><strong>5. Ford F-Series</strong><br>
  38. The Ford F-Series of pickups has put a huge fleet of tough trucks.
  39. </div>
  40. <div>
  41. <img src="img/banner06.jpg" alt="Nissan Sentra" /></a>
  42. <br /><strong>6. Nissan Sentra</strong><br>
  43. The 2013 Nissan Sentra drives up in six models, from the basic S.
  44. </div>
  45. <div>
  46. <img src="img/banner07.jpg" alt="Nissan Altima" /></a>
  47. <br /><strong>7. Nissan Altima</strong><br>
  48. The midsize Nissan Altima was completely made over for the 2013 model.
  49. </div>
  50. <div>
  51. <img src="img/banner08.jpg" alt="Chevrolet Silverado" /></a>
  52. <br /><strong>8. Chevrolet Silverado</strong><br>
  53. The 2013 Chevy Silverado, with a starting price of $23,590 for the two-wheel-drive 1500 model.
  54. </div>
  55. <div>
  56. <img src="img/banner09.jpg" alt="Honda CR-V" /></a>
  57. <br /><strong>9. Honda CR-V</strong><br>
  58. With its tight turning radius, carlike handling and roomy interior.
  59. </div>
  60. <div>
  61. <img src="img/banner10.jpg" alt="Nissan Versa" /></a>
  62. <br /><strong>10. Nissan Versa</strong><br>
  63. The 2013 Nissan Versa scores big points for its affordability.
  64. </div>
  65.  
  66. </div>
  67.  
  68.  
  69. <div id="nav"></div>
  70. <div id="button-previous">prev</div>
  71. <div id="button-next">next</div>
  72.  
  73. <script type="text/javascript" src="jquery-1.2.6.min.js"></script>
  74.  
  75. <script type="text/javascript">
  76.  
  77. /***
  78. Simple jQuery Slideshow Script
  79. Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it :)
  80. ***/
  81.  
  82.  
  83.  
  84. $(document).ready(function(){
  85. $('.sp').first().addClass('active');
  86. $('.sp').hide();
  87. $('.active').show();
  88.  
  89. $('#button-next').click(function(){
  90.  
  91. $('.active').removeClass('active').addClass('oldActive');
  92. if ( $('.oldActive').is(':last-child')) {
  93. $('.sp').first().addClass('active');
  94. }
  95. else{
  96. $('.oldActive').next().addClass('active');
  97. }
  98. $('.oldActive').removeClass('oldActive');
  99. $('.sp').fadeOut();
  100. $('.active').fadeIn();
  101.  
  102.  
  103. });
  104.  
  105. $('#button-previous').click(function(){
  106. $('.active').removeClass('active').addClass('oldActive');
  107. if ( $('.oldActive').is(':first-child')) {
  108. $('.sp').last().addClass('active');
  109. }
  110. else{
  111. $('.oldActive').prev().addClass('active');
  112. }
  113. $('.oldActive').removeClass('oldActive');
  114. $('.sp').fadeOut();
  115. $('.active').fadeIn();
  116. });
  117.  
  118.  
  119.  
  120.  
  121. });
  122.  
  123. </script>
  124.  
  125. <style type="text/css">
  126.  
  127. /*** set the width and height to match your images **/
  128.  
  129. #slideshow {
  130. position:relative;
  131. height:560px;
  132. width:620px;
  133. }
  134.  
  135. #slideshow DIV {
  136. position:absolute;
  137. top:0;
  138. left:0;
  139. z-index:8;
  140. opacity:0.0;
  141. height: 560px;
  142. width:620px;
  143. background-color: #FFF;
  144. }
  145.  
  146. #slideshow DIV.active {
  147. z-index:10;
  148. opacity:1.0;
  149. }
  150.  
  151. #slideshow DIV.last-active {
  152. z-index:9;
  153. }
  154.  
  155. #slideshow DIV IMG {
  156. height: 350px;
  157. display: block;
  158. border: 0;
  159. margin-bottom: 10px;
  160. }
  161.  
  162. #nav {margin-top:20px; width:100%;}
  163. #button-previous {float:left;margin-left:200px;}
  164. #button-next {float:right;margin-right:200px;}
  165.  
  166.  
  167. </style>
Advertisement
Add Comment
Please, Sign In to add comment