Return to Snippet

Revision: 51898
at October 7, 2011 00:04 by tcelestino


Initial Code
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>hide div com setInterval</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
<script>
$(document).ready(function() {
	function sumir_floater() {
		var div = $("#floater");
		div.fadeIn();
		div.queue(function() {
			setTimeout(function() {
				div.dequeue();
			}, 5000);
		});
	div.fadeOut("fast");
	}

sumir_floater();

});
</script>
</head>

<body>
<div id="floater">
  <p>Image or Text here</p>
</div>
</body>
</html>

Initial URL

                                

Initial Description

                                

Initial Title
Hide div with setTimeout

Initial Tags

                                

Initial Language
jQuery