Upon what you've told, it's gonna look something like this (tested on the latest IE, FF, NS, OP - so far okay):
Code:
if(document.getElementById&&!document.all){
function moveFFNS(ev){
eX=document.body.scrollLeft+ev.clientX;
eY=document.body.scrollTop+ev.clientY;
}
document.onmousemove=moveFFNS;
}
if(document.getElementById&&document.all){
function moveIEOP(){
eX=document.body.scrollLeft+event.x;
eY=document.body.scrollTop+event.y;
}
document.onmousemove=moveIEOP;
}
Once you do that, it will work on a valid page (one with a valid URL DOCTYPE) in virtually all browsers as well, as long as you specify units for all style dimensions and positions, and tighten up your tests for compatibility with window.innerHeight vs document.body/documentElement.clientHeight issues.
Sorry but that's rather the job of who wants to insert the code into his or her own HTML.
What you were saying about not having a container might be a key issue in reducing the drifting apart of the elements when the CPU or the CPU/browser timing is constrained for some reason.
Sure, although i'm not gonna make a version with a container layer. Actually that's why i've put the code up on DD. I'm myself not making webpages anymore. If anyone feels like picking the code up, is encouraged to develop it for his or her own taste and skills. It's all noted in the code. Although i doubt it will ever get such a popularity, smartened up or not...
Bookmarks