Hi I am trying to use kevin luck jscrollpane and having some difficulty intergrating two sets of code. I wonder if someone might give me a hand here.
Basically I have the scrollbar resize, but I want to add an auto scroll to top.
Thank you in advance for help and advice
Code:
$(function(){
				
	$('.scrollpane-window').jScrollPane(
		function(){
			$(this).jScrollPane({ showArrows: $(this).is('.arrow') } );
			var api = $(this).data('jsp');
			var throttleTimeout;
			$(window).bind( 'resize',
				function() {
					if ($.browser.msie) {
						if (!throttleTimeout) {
						throttleTimeout = setTimeout( function() { api.reinitialise(); throttleTimeout = null; }, 50 );
						}
					} else {
						api.reinitialise();
					}
				}
			);
		}
	)
});
Code:
$(function()
{
	var pane = $('.scroll-pane');
	pane.jScrollPane(
		{
			showArrows: true
		}
	);
	var api = pane.data('jsp');

	$('#but-scroll-to').bind(
		'click',
		function()
		{
			// Note, there is also scrollToX and scrollToY methods if you only
			// want to scroll in one dimension
			api.scrollTo(parseInt($('#toX').val()), parseInt($('#toY').val()));
			return false;
		}
	);

	$('#but-scroll-by').bind(
		'click',
		function()
		{
			// Note, there is also scrollByX and scrollByY methods if you only
			// want to scroll in one dimension
			api.scrollBy(parseInt($('#byX').val()), parseInt($('#byY').val()));
			return false;
		}
	);
});