[jQuery] Object position on mousemove. Failed to set up easing.

[jQuery] Object position on mousemove. Failed to set up easing.

Hello there,
Obviously I've a problem :
An object's position is updated relatively to mouseposition on
mousemove
opposite direction
. Works perfectly well, but I failed to
set up the code with smooth easing as result. The code works in
Actionscript in Flash
of course in proper syntax
but it doesn't work
in jQuery syntax and code-elements. Strange is that nearly the same
code works in Actionscript and there WITH easing
In jQuery, I used "css
" to position the object, "animate
with
easing" produces a messy animation.
Any idea how I could implement an easing to this animation?
$
.mousemove
function
e
{
$
".object"
.each
function
{
var position = $
this
.offset
;
var position_x = position.left;
position_x = 0;
var windowwidth =
$
window
.width
/2
;
var endX =
windowwidth
-
e.pageX
;
var speed = 5;
position_x
=
endX-position_x
/speed;
$
this
.css
{'left':position_x}
;
}
; }
;
My result: <a href="http://www.eggger.com/index.php">www.eggger.com/
index.php</a>
Br,
Tobie