I am using two scripts that fire at the same time. They seem to cause a conflict. The question I have is how can I get one to fire a half a second to a second after the other fires? I think that might solve the issue I am having.
I am using jQuery but I am unsure how to go about this.
Thanks
Note I did not post the scripts here a they are irreverent. I just need to know how to delay one from firing until the other has. Also the one I want to fire last is at the bottom of the HTML the other is in the head. Also the two scripts are completely unrelated to each other in what they do.
EDIT This question stems from another question i posted. Here – Javascript/Fancybox Error? – I thought about it and would like to try to add a delay but I am also curious as how to add the delay anyway that is not related to the issue I am having.
If you want fancybox to run first, use the fancybox onComplete callback:
otherwise, put the fancybox code in after calling your custom init function: