daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest May 17th, 2018 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var ListRenderRenderWrapper = function(itemRenderResult, inCtx, tpl)
  2. {
  3.     var iStr = [];
  4.     iStr.push('<div class="mySlides fade">');
  5.     iStr.push(itemRenderResult);
  6.     iStr.push('</div>');
  7.     return iStr.join('');
  8. }
  9. ctx['ItemRenderWrapper'] = ListRenderRenderWrapper;
  10. _#-->
  11. <div class="slideshow-container">
  12.  
  13.             _#= ctx.RenderGroups(ctx) =#_
  14.    
  15.   <!-- Next and previous buttons -->
  16.   <a class="prev" onclick="plusSlides(-1)">&#10094;</a>
  17.   <a class="next" onclick="plusSlides(1)">&#10095;</a>
  18. </div>
  19. <br>
  20.  
  21. <!-- The dots/circles -->
  22. <div style="text-align:center">
  23. <!--#_ for (var i  = 0; i < ctx.ListData.ResultTables[0].RowCount; i++ ) {
  24.  
  25. _#-->
  26.   <span class="dot" onclick="currentSlide(i+1)"></span>
  27.  
  28. <!--#_ } _#-->
  29.  
  30. </div>
  31. <!--#_
  32.  
  33. if (ctx.ClientControl.get_shouldShowNoResultMessage())
  34. {
  35. _#-->
  36.         <div class="_#= noResultsClassName =#_">_#= $noResults =#_</div>
  37. <!--#_
  38. }
  39. _#-->
  40.  
  41. <!--#_
  42.  
  43. AddPostRenderCallback(ctx, function(){
  44. var slideIndex = 1;
  45. showSlides(slideIndex);
  46.  
  47.  
  48. function showSlides(n) {
  49.  var i;
  50.  var slides = document.getElementsByClassName("mySlides");
  51.  var dots = document.getElementsByClassName("dot");
  52.  if (n > slides.length) {slideIndex = 1}
  53.  if (n < 1) {slideIndex = slides.length}
  54.  for (i = 0; i < slides.length; i++) {
  55.      slides[i].style.display = "none";
  56.  }
  57.  for (i = 0; i < dots.length; i++) {
  58.      dots[i].className = dots[i].className.replace(" active", "");
  59.  }
  60.  slides[slideIndex-1].style.display = "block";
  61.  dots[slideIndex-1].className += " active";
  62. }
  63.  
  64.  
  65. function plusSlides(n) {
  66.  showSlides(slideIndex += n);
  67. }
  68.  
  69.  
  70. function currentSlide(n) {
  71.  showSlides(slideIndex = n);
  72. }
  73.  
  74. });
  75. _#-->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top