Cursor follow example

Source code:

<!-- Example for KLayers project http://www.kruglov.ru/klayers/ (c) Kruglov S.A. 2002 --> <script src="klayers.js"></script> <div id="Follower" style=" position: absolute; visibility:hidden; background-color: black; color: white; left: 0px; top: 0px"> Follower</div> <script> var mousex = 0 var mousey = 0 if(isNC4) document.captureEvents(Event.MOUSEMOVE) if(isMSIE || isOpera7){ document.onmousemove=function(){ mousex=event.clientX+document.body.scrollLeft mousey=event.clientY+document.body.scrollTop moveFollower() return true } }else if(isOpera){ document.onmousemove=function(){ mousex=event.clientX mousey=event.clientY moveFollower() return true } }else if(isNC){ document.onmousemove=function(e){ mousex = e.pageX mousey = e.pageY moveFollower() return true } } var s=layer("Follower") // call to layer "Follower" function moveFollower(){ s.show() s.moveTo(mousex,mousey) } </script>