What's the scroll thumb position? The word thumb doesn't appear on the demo page.
If you want the position of the content within the scroller, just query that from the element. For example, if you install the script exactly as directed on the demo page, you can add the highlighted:
Code:
. . . vascript" src="facescroll.js">
/***********************************************
* FaceScroll custom scrollbar (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>
<script type="text/javascript">
jQuery(function(){ // on page DOM load
$('#demo1').alternateScroll();
$('#demo2').alternateScroll({ 'vertical-bar-class': 'styled-v-bar', 'hide-bars': false });
var demo1 = $('#demo1').find('.alt-scroll-content');
setInterval(function(){$('#dat').val(demo1.position().top);}, 100);
})
</script>
</head>
<body>
<p><b>Scrollbar (default style) shows onMouseover</b></p>
<input type="text" id="dat">
<div id="demo1" style="width:300px; height:250px; padding:8px; background:lightyellow; border:1px solid gray; resize:both; overflow:scroll">
From Wikipedia- Gunpowder, also known since in the la . . .
The scroll position will be continually updated in the text input. Now that's probably not the use you want to put this to. But you should be able to adapt the code to do what you want it to do.
Any questions, feel free to ask.
If you're having problems, and/or want tweaks, a link to your page would be a good idea.
Bookmarks