Guest User

Untitled

a guest
Jul 15th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. $(document).ready(function() {
  2.  
  3. $(".thumbs-right").hover(function() {
  4.  
  5. $(this).attr("src","images/arrow-big-right-h.png");
  6. $('.thumbs').animate({scrollRight: 20 + 'px'}, 600);
  7.  
  8. }, function() {
  9.  
  10. $(this).attr("src","images/arrow-big-right.png");
  11.  
  12. });
  13.  
  14. });
  15.  
  16. .thumbs {
  17. float: left;
  18. width: 500px;
  19. height: 150px;
  20. background: red;
  21. overflow: hidden;
  22. }
  23.  
  24. <div class="thumbs">
  25.  
  26. <img src="images/thumb.png" alt="thumb" />
  27. <img src="images/thumb.png" alt="thumb" />
  28. <img src="images/thumb.png" alt="thumb" />
  29. <img src="images/thumb.png" alt="thumb" />
  30. <img src="images/thumb.png" alt="thumb" />
  31. <img src="images/thumb.png" alt="thumb" />
  32. <img src="images/thumb.png" alt="thumb" />
  33. <img src="images/thumb.png" alt="thumb" />
  34. <img src="images/thumb.png" alt="thumb" />
  35. <img src="images/thumb.png" alt="thumb" />
  36.  
  37. </div>
  38.  
  39. <img src="images/arrow-big-right.png" alt="right arrow" class="thumbs-right" />
  40.  
  41. position: relative;
  42.  
  43. $('.thumbs').animate({scrollRight: 20 + 'px'}, 600);
  44.  
  45. $('.thumbs').animate({ left: '20px' }, 600);
  46.  
  47. .thumbs {
  48. float: left;
  49. width: 500px;
  50. height: 150px;
  51. background: red;
  52. overflow: hidden;
  53. }
  54.  
  55. .thumbs img {
  56. position: relative;
  57. }
  58.  
  59. $(".thumbs-right").hover(function() {
  60.  
  61. $(this).attr("src","images/arrow-big-right-h.png");
  62. $('.thumbs img').animate({right:"+=20px"}, 600);
  63. }, function() {
  64. $(this).attr("src","images/arrow-big-right.png");
  65.  
  66. });
Add Comment
Please, Sign In to add comment