Use JTrackBar to simulate an apple-style scroll bar
The Code is as follows:
Function JObj (){}
JObj. $ c = function (tag) {return document. createElement (tag )};
JObj. $ = function (id) {return document. getElementById (id )};
JObj. isRate = function (pRateString ){
If (! IsNaN (pRateString) return false;
If (pRateString. substr (pRateString. length-1, 1 )! = "% ")
Return false;
If (isNaN (pRateString. substring (0, pRateString. length-1 )))
Return false;
Return true;
}
Function JPos (){}
JPos. getAbsPos = function (pTarget ){
Var x _ = y _ = 0;
While (pTarget. offsetParent ){
X _ + = pTarget. offsetLeft;
Y _ + = pTarget. offsetTop;
PTarget = pTarget. offsetParent;
}
X _ + = pTarget. offsetLeft;
Y _ + = pTarget. offsetTop;
Return {x: x _, y: y _};
}
JPos. getMousePos = function (evt ){
Var x _ = y _ = 0;
Evt = evt | window. event;
If (evt. pageX | evt. pageY ){
X _ = evt. pageX;
Y _ = evt. pageY;
} Else {
X _ = evt. clientX + document. body. scrollLeft-document. body. clientLeft;
Y _ = evt. clientY + document. body. scrollTop-document. body. clientTop;
}
Return {x: x _, y: y _};
}