document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. function ScrollSlider(ele,height,speed){
  2.         var curIndex = 0;
  3.         var maxIndex = 0;
  4.         var scrollHeight = height;
  5.        
  6.         var slider = $(\'#container ul\').eq(0);
  7.         maxIndex = $(slider).find("li").length - 1;
  8.         $(\'#container\').on(\'DOMMouseScroll mousewheel\', function (e) {
  9.           if(!$(slider).is(":animated")){
  10.                   if(e.originalEvent.detail > 0 || e.originalEvent.wheelDelta < 0) {              
  11.                         if(curIndex < maxIndex){
  12.                                 $(slider).animate({ top:\'-=\' + scrollHeight + \'px\' },speed);
  13.                                 curIndex++;
  14.                         }else{
  15.                                 return true;
  16.                         }
  17.                   } else {
  18.                         if(curIndex > 0){
  19.                                 $(slider).animate({ top:\'+=\' + scrollHeight + \'px\' },speed);
  20.                                 curIndex--;
  21.                         }else{
  22.                                 return true;
  23.                         }      
  24.                   }      
  25.           }
  26.          
  27.           return false;
  28.          
  29.         });
  30. }
');