I think you need to do something like this:
myfunc = return
moveDatascape('#dsViewport',mouseX,scrollSteps,stageWidth,frameWidth,maxX,minX);
But, you don't want moveDatascape to actually execute at that point, so
you'll need to alter your moveDatascape function a bit:
moveDatascape =
function(el,mouseX,scrollSteps,stageWidth,frameWidth,maxX,minX) {
return (function() // rest of function follows
Then you can just do:
setInterval(myfunc, 20);
-- Josh
----- Original Message -----
From: Alexandre Plennevaux
To: jquery-en@googlegroups.com
Sent: Thursday, October 18, 2007 10:21 AM
Subject: [jQuery] setInterval not working
hi friends,
can someone tell me what i'm doing wrong:
i'm implementing a list displayed horizontally, that should position itself
according to the user position. if the mouse is in the extreme left, div
should move to the left rapidly, if it is in middle left, it should move
half the speed, etc.
this is my code: http://m2.lab-au.com/_js/frontend/datascape.js
check this prototype : http://m2.lab-au.com/proto_metalab2_datascape.htm
it appears the function responsible for updating the zone position is only
triggered once, whereas it is launched via a setInterval, so i assumed it
should be triggered every n millisecondds.
Could someone enlighten me?
thanks a lot,
Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
Lakensestraat/Rue de Laeken 104
B-1000 Brussel-Bruxelles-Brussels
Belgie-Belgique-Belgium
Tel:+32(0)2.219.65.55
Fax:+32(0)2.426.69.86
Mobile:+32(0)476.23.21.42
http://www.lab-au.com
http://www.mediaruimte.be
__________________________________________________________________________
The information in this e-mail is intended only for the addressee named
above. If you are not that addressee, please note that any disclosure,
distribution or copying of this e-mail is prohibited.
Because e-mail can be electronically altered, the integrity of this
communication cannot be guaranteed.
__________________________________________________________________________
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.15.0/1076 - Date: 17/10/2007
19:53