I tried to set a paint apps in an slider show. Thus I need the active slide div position.
The position of the slide wrapper (div.slide) work fine without adding slide effect. Such as without slider.
But when I add the slider effect, the position goes wrong. As you can see with slider, the position show 1.[x:528 y:8], 2.[x:1048 y:8] and 3.[x:8 y:8].
I think it should always be [x:8 y:8] for every slide when it is active. The findPos function is as following
//Get the absolute position of a DOM object on a page
function findPos(obj) {
var curLeft = curTop = 0;
if (obj.offsetParent) {
do {
curLeft += obj.offsetLeft;
curTop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return {x:curLeft, y:curTop};
}
Could someone give some hint? Thanks.