Hi everyone
I need a little help.
I have a site where the first time a visitor comes to the site, i have to hide a <Div> tag.
After 5 sec the <Div> tag should fade in. It should only do this the first time.
Here is the code i have been trying to get work
I am trying to use .data to set a value, after the jQuery had shown the box the first time.
If the value is set it should not hide the "<Div>"
Any hint witch could point me in the right direction would help. tanks in advance...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<style type="text/css">
.div {
background-color: #6699FF;
border-style: dotted;
height: 251px;
width:600px;
}
</style>
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript">
$("#setTest").text(jQuery.data(#setTest, "true"));
case:1
$(document).ready(function(){
$(".div").hide()
$(".div").delay(2000).fadeIn(6000);
case:2
jQuery.data(#setTest { "true" });
});
</script>
</head>
<body>
<div class="div"></div>
<div id="setTest"></div>
</body>
</html>