Add a Time Delay to Button and Text

How can i add a time delay that will work with the following code? This is the lower portion of code

else {
$w(“#text71”).text = “Please choose a file to upload.”;
}
$w(‘#button17’).hide();
// I’m trying to add a time delay to the code above line 47 and 48 so that the button and text only appears after five seconds
$w(‘#button18’).expand();
$w(‘#text72’).expand();

}

I have the following code example but this will not work for me and only shows errors if i place above
$w(‘#button18’).expand();
$w(‘#text72’).expand();

CODE EXAMPLE
$w.onReady(function() {
setTimeout(function() {
$w(“#image11”).show(“FadeIn”);
}, 1000);
}

Thanks
Adam

@adcatch02 It’s better if you share the whole code page. Errors can be the result of some other price of code that you are not sharing :-).

If the CODE EXAMPLE is above the area you are having problems with then it may be that you are doing something you shouldn’t outside of the onReady function.

The code example in isolation should delay for 1 second before fading in the image.

The rest needs more context.