I did searches and there were a few similar posts but I can't seem to get it to work. I know that its a cliche but I am quite new to JQuery and JQuery UI as my core skills is PHP, so any help is greatly appreciated. Below are the codes that I have for the JQuery vertical slider.
$("#VerticalScrollBar").slider({
orientation: "vertical",
change: VerticalHandleChange,
slide: VerticalHandleSlide,
min: -100,
max: 0
});
and the functions
function VerticalHandleChange(e, ui) {
var maxScroll = $(".VerticalScroll").attr("scrollHeight") - $(".VerticalScroll").height();
$(".VerticalScroll").animate({
scrollTop: -ui.value * (maxScroll / 100)
}, 1000);
function VerticalHandleSlide(e, ui) {
var maxScroll = $(".VerticalScroll").attr("scrollHeight") - $(".VerticalScroll").height();
$(".VerticalScroll").attr({
scrollTop: -ui.value * (maxScroll / 100)
});
The vertical slider works fine but now I need to integrate mouse wheel support. I have downloaded the mouse wheel plugin by Brandon Aaron (jquery-mousewheel ver. 3.0.4) but I have no idea how to use it with my codes above. Anyone can help me with this? Thanks again.