Ah ha... thanx... i added a new block of code as well. now it works fine :)
<script type="text/javascript">
var blink = function(){
//$('#mypopup').css({left:0px, top:0px}
$("#mypopup").css({"left": "0px"});
$("#mypopup").css({"top": "0px"});
$('#mypopup').toggle();
setTimeout(hide_div,2000);
setTimeout(blink,5000);
};
$(document).ready(function() {
// setInterval(blink, 10000);
setTimeout(blink,5000);
});
function hide_div(){
$('#mypopup').toggle();
}
</script>
But there is something i want to know. on my previous post i said "because of this toggle() method". but i think that its incorrect. toggle() only display the div right? and by using this setInterval() method, like i said ,blink() function executed 10 seconds after loading the page and it displayed for 10 more seconds and looped the whole thing again and again. Can i know why does it happen that way? is that the way setInterval() works?