View Full Version : Make "FaceScroll Custom scrollbar" scroll horizontal with mouse wheel
sdavey
06-06-2013, 04:24 AM
1) Script Title: FaceScroll Custom scrollbar
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex11/facescroll/index.htm
3) Describe problem: I want to make this scroll horizontally with the mouse wheel instead of scrolling vertically.
jscheuer1
06-17-2013, 04:06 PM
Well obviously it cannot do both and some scrollers could scroll in both directions. Or you might have two scrollers on a page and want one to mouse control vertical, another horizontal. So I've made up a modified version of the script that allows you to specify if you want the mouse to control the horizontal rather than the vertical for a scroller (right click and 'Save As'):
5095
To use the new option, first you need a scroller that scrolls horizontally*. Then say you have an on page init like:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll();
})
</script>
Add the highlighted:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll({'horzmouse': true});
})
</script>
Or, if you already have a configuration object - say:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll({'hide-bars': false});
})
</script>
Add to it:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll({'hide-bars': false, 'horzmouse': true});
})
</script>
*If you need help with that, let me know.
Powered by vBulletin® Version 4.2.2 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.