Created
December 8, 2010 17:22
-
-
Save ovenbits/733584 to your computer and use it in GitHub Desktop.
ad gallery mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.css('opacity', 0.6) | |
.mousedown( | |
function() { | |
var direction = 'left'; | |
if($(this).is('.ad-forward')) { | |
direction = 'right'; | |
}; | |
thumbs_scroll_interval = setInterval( | |
function() { | |
has_scrolled++; | |
// Don't want to stop the slideshow just because we scrolled a pixel or two | |
if(has_scrolled > 30 && context.settings.slideshow.stop_on_scroll) { | |
context.slideshow.stop(); | |
}; | |
var left = context.thumbs_wrapper.scrollLeft() + 1; | |
if(direction == 'left') { | |
left = context.thumbs_wrapper.scrollLeft() - 1; | |
}; | |
context.thumbs_wrapper.scrollLeft(left); | |
}, | |
10 | |
); | |
$(this).css('opacity', 1); | |
}) | |
.mouseup( | |
function() { | |
has_scrolled = 0; | |
clearInterval(thumbs_scroll_interval); | |
$(this).css('opacity', 0.6); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment