hi all,
question for javascripts programmers
i'm a beginner in javascript but not in programming by other langs and i'm using setTimeout to make delay in my animation for div block, i have four divs each one can expand and collapsed as a slide, the problem occur when more than one block move in the same time, and the reason because the seTimeout is a delay to execute a javascript code, function...etc and in this case the code execution will jump and execute what is after setTimeout, before end the execution of the script setTimeout
in another word, i want a way for delay that make the execution of the code stop until finish delay period and run the script that linked to the delay command. I don’t know if there is another way not using setTimeout or setInterval.
i think javascript is make more than one thread in its execution, not as one thread. i tried to re-write my code, but no way, i thought about AJAX also but i hope to find a way to solve that in javascript itself.
best regards



Reply With Quote


Bookmarks