I have a script, that changes pictures with transparency effect on same place, but I don’t like, that it is called with setInterval. Is there some way to have same result, but maybe with some loop from inside function and make a delay there.
Thanks everyone for help.
UPD:
Examples of your thoughts are always welcome.
No.
JavaScript doesn’t have a
sleep, and if it did it would block everything until it finished.There is nothing wrong with
setInterval.