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'):
facescroll.js
To use the new option, first you need a scroller that scrolls horizontally*. Then say you have an on page init like:
Code:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll();
})
</script>
Add the highlighted:
Code:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll({'horzmouse': true}
);
})
</script>
Or, if you already have a configuration object - say:
Code:
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll({'hide-bars': false});
})
</script>
Add to it:
Code:
<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.
Bookmarks