Delay pop up, appear once and then disappear

I would like to have a pop up that appears after 4 seconds and appears until the user uses the mouse. If the user scrolls before it appears it should not appear. Is that possible to make. Check the image to see the pop up boks :)

<div id="instructions"><p>Scroll ned for at komme til venstre</p><img src="img/mouse.gif"></div>

Pop up

Upvotes: 0

Views: 201

Answers (1)

Korgrue
Korgrue

Reputation: 3478

Invoke setTimeout once the popup opens and set it to 4000ms (4s). Then use whatever method you want to hide the popup - for example, display:none;

setTimeout(function(){ hidePopup() }, 4000);

Upvotes: 1

Related Questions