I use pure JavaScript no libraries I am newer to client side programming and especially to JavaScript.
I have my client side window delimited to the left and right side.
At some point when user press button completeTask event handler is fired.
The event handler adds two HTML elements one on left side another on right side of window with delay about 3000msec.
Here is conceptual description of event handler:
function completeTask()
{
addSomeElemntToLeftSide();
delay(3000);
addSomeElemntToRightSide();
}
The problem is that both HTML elements have been added to the DOM after event handler is executed without any delay.
Any idea what should I do to make delay between adding two elements left and then after 3000msec right?