Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. $(function($){
  2. $("#thumb-next").mousedown(function(){
  3. scrolling = true;
  4. startScrollingNext($("#thumb-list"), "-=20px");
  5. }).mouseup(function(){
  6. scrolling = false;
  7. });
  8. });
  9.  
  10. function startScrollingNext(obj, param) {
  11.  
  12. var thumbLeft = $('#thumb-list').css('left');
  13. var thumbLeft = parseInt(thumbLeft);
  14.  
  15. if (thumbLeft >= -526) {
  16. if ( !scrolling ) {
  17. obj.stop();
  18. } else {
  19. obj.transition({'left': param}, 10, function(){
  20. if ( scrolling ) {
  21. startScrollingNext(obj, param);
  22. }
  23. });
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement