faqts : Computers : Programming : Languages : JavaScript : DHTML : DOM

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

Want to make a img-menu, the img-buttons should sliding in one after another at the beginning!???

Nov 24th, 2002 23:37
Klaus Bolwin, alex munk,


For every icon, you must have a function like this:
function MoveIcon1(start, finish, step, speed)
{
    if (start > finish)
        {
        document.getElementById("gbicon").style.left = start+"px";
        start=start-step;
setTimeout("MoveIcon1("+start+","+finish+","+step+","+speed+")",speed);
        }
    else
        {
        MoveIcon2(700, 100, 15, 1)
        }
}
the first function (MoveIcon1()) must be called by the onload event. I
tried to address the icons by a variable, however it failes.