SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Song scroller */
  2.  
  3.     var scrolling = null;
  4.  
  5.        function scroll_left() {
  6.          
  7.          $("#scroller").scrollLeft = $("#scroller").scrollLeft + 5;
  8.  
  9.          scrolling = window.setTimeout(function() {
  10.              scroll_left();
  11.          }, 100);
  12.        }
  13.        function scroll_right() {
  14.          var d = $("#scroller");
  15.  
  16.          $("#scroller").scrollLeft = $("#scroller").scrollLeft - 5;
  17.  
  18.          scrolling = window.setTimeout(function() {
  19.              scroll_right();
  20.          }, 50);
  21.        }
  22.        
  23.      function stop_scroll() {
  24.          window.clearTimeout(scrolling);
  25.        }
RAW Paste Data
Top