下拉广告`

PE HTML>
<html>
<head>
<meta charset="gb2312">
<title>广告`</title>
<link rel="stylesheet" href="http://a.tbcdn.cn/apps/dts/th3/css/public.css" />
<script src="http://a.tbcdn.cn/apps/dts/th3/js/jquery.js"></script>
 
</head>

<body>
 
 
<div class="taohua_ad_banner_top" style="background-color: rgb(0, 0, 0); text-align: center; display: none; ">
	<a href="http://www.taohua.com/act.htm?id=prhp7pre" target="_blank">
		<img src="http://img04.taobaocdn.com/tps/i4/T1oH9zXjhQXXXXXXXX-1000-300.jpg" alt="" style="width:1000px;height:300px;" usemap="#map" title="哈利.波特与死亡圣器(下)">
		<map name="map">
			<area shape="rect" coords="930,11,979,34" href="#" style="cursor:pointer;outline:none;" id="close_ad">
		</map> 
	</a>
</div>

<script type="text/javascript">

	jQuery(function(){

		var jq_ad_banner_top = jQuery('.taohua_ad_banner_top'),

			timeid = null;		


		setTimeout(function(){	jq_ad_banner_top.slideDown(1000)},1000);//页面加载完了再加载

		

		timeid = setTimeout(function(){close_ad_banner();},10000);//10s后自动关闭

		

		function close_ad_banner() {//关闭函数

			jq_ad_banner_top.slideUp(1000);

		}

		

		jq_ad_banner_top.mouseenter(function() {

			if(timeid) {

				clearTimeout(timeid);

			}

		})

		

		jq_ad_banner_top.mouseleave(function() {

			timeid = setTimeout(function(){close_ad_banner();},3000);

		})

		

		jQuery('#close_ad').click(function(e){

			e.stopPropagation();

			e.preventDefault();						

			close_ad_banner();			

		})

	})

</script>

  

posted @ 2011-11-10 10:55  kpbiao  阅读(195)  评论(0编辑  收藏  举报