View my example on JSFiddle for a visual demonstration. My goal is to have a message appear in the top left corner every 5 minutes, flicker a few times, and then fade away gradually. I'm not very skilled in CSS and was thinking it may require some JavaScript as well. The message should be enclosed in a rounded-corner box. Below you'll find my CSS code.
Thank you in advance!
HTML:
<div id="container">
<div id="map_size" class="map_size">
<div id="msg">
New records available.
</div>
</div>
</div>
CSS:
/*body*/
body{
margin:0px auto;
width:80%;
height:80%;
font-family: Verdana,Geneva,sans-serif;
}
/*container for all divs inside*/
#container {
width:1450px;
}
/*map size*/
#map_size{
width:1190px;
height:1300px;
background:#0099FF;
border-style: solid;
border-color: black;
position: relative;
float:left;
}
/*msg*/
.station_info_ {
z-index: 100;
position: absolute;
background-color:white;
border-radius: 5px;
height: 200px;
margin-left: 50px;
width: 275px;
border:4px solid black;
}
JS: I want the message to be hidden when the page loads, and only show every 5 minutes after that. How can this be achieved?
<script type="text/javascript">
$('document').ready(function(){
window.setInerval('test()',3000);
});
function test(){
$('#msg').toggle();
}
</script>