I want to make a function stop after 5 seconds of the first call. However I cannot find a proper way to do it. I have created a function which creates a div element with an img