Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <div id="Carousel2" class="carousel slide" data-ride="carousel">
  2. <!-- Indicators -->
  3. <div class="hidenumbers">
  4. <ol class="carousel-indicators" id="move">
  5. <li data-target="#Carousel2" data-slide-to="0" class="active">1</li>
  6. <li data-target="#Carousel2" data-slide-to="1">2</li>
  7. <li data-target="#Carousel2" data-slide-to="2">3</li>
  8. <li data-target="#Carousel2" data-slide-to="3">4</li>
  9. </ol>
  10. </div>
  11. <!-- Wrapper for slides -->
  12. <div class="carousel-inner" id="newscarousel" role="listbox">
  13. <div class="item active">
  14. <img src="news.png" alt="">
  15. </div>
  16. <div class="item">
  17. <img src="news.png" alt="">
  18. </div>
  19. <div class="item">
  20. <img src="news.png" alt="">
  21. </div>
  22. <div class="item">
  23. <img src="news.png" alt="">
  24. </div>
  25. </div><!-- Carousel inner -->
  26. <a class="left carousel-control" href="#Carousel2" role="button" data-slide="prev">
  27. <img src="left.png" onClick="prev()" aria-hidden="true">
  28. <span class="sr-only">Previous</span>
  29. </a>
  30. <a class="right carousel-control" href="#Carousel2" role="button" data-slide="next">
  31. <img src="right.png" onClick="nxt()" aria-hidden="true">
  32. <span class="sr-only">Next</span>
  33. </a>
  34. </div><!-- CAROUSEL 2 -->
  35.  
  36. function prev() {
  37. var val = (parseInt(document.getElementById('move').style.left, 10) || -27) + 18;
  38. document.getElementById('move').style.left = val + 'px';
  39. }
  40.  
  41. function nxt() {
  42. var val = (parseInt(document.getElementById('move').style.left, 10) || 45) - 18;
  43. document.getElementById('move').style.left = val + 'px';
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement