I need to move multiple 'div' elements to multiple locations on the page at the same time.

i've attempted to simply run through a loop using window.setTimeout() however that does not work. all elements 'pause' in their start position then 'jump' to the location.

if i attmept to move a single element it's fine. however i have a multi-dimensional array full of elements.

does anyone know of a good tutorial that describes how to go about doing this? i just need the logic - i can write the code. however if anyone has any code they can provide as an example i will not object.

If you would like a little more detail about the specific project let me know and i can elaborate.

Mr J

01-19-2006, 07:59 PM

I have a few examples that may put you on the right path.

Take a look in the CSS & Scripts section for Multi Animation and the Preset Scroll examples.

// Example 3 - To an Anchor Position - The element and anchor must have a unique ID names
// <input type="button" id="fred" value="Move to this Position" onclick="zxcMoveTo('Tst1','fred',4,50);zxcMoveTo('Tst2','fred',1,200);">

// The Call Parameters
// Specified Position - zxcMoveTo('Tst1',400,300,4,50);
// Anchor Position - zxcMoveTo('Tst1','AnchorID',4,50);
// parameter 0 - the object or the unique ID name of the object to move (object or string ID)
// parameter 1 - Specified Position
// An array of new X and Y positions
// field 0 - new Horizontal(X) position (digits)
// field 1 - new Vertical(Y) position (digits)
// parameter 1 - Anchor Position
// the unique ID name of the anchor element (string)
// parameter 2 - (optional) the move increment or default (digits)
// default is set by customising variable zxcDefaultIncrement
// the last value is retained until changed
// parameter 3 - (optional) the move delay or default (digits)
// default is set by customising variable zxcDefaultDelay
// the last value is retained until changed

// All variable, function etc. names are prefixed with 'zxc' to minimise conflicts with other JavaScripts
// These charactors may be changed to charactors of choise using global find and replace