你的位置:首页 > Java教程

[Java教程]点击页面任何位置隐藏div


<include file="Public:header" /><style type="text/css">	table{width:100%;margin: 0;}</style><script type='text/javascript' src="http://www.cnblogs.com//{:APP_PATH}/Public/js/unslider.min.js"></script>	<script type="text/javascript">	//定义页面载入事件	/*$(function(){		$('#more').addClass('moreno');		$('#more').click(function(){			//隐藏元素(向左移动)			if ($('#more').hasClass('moreno')) {				$('#sider').animate({				left:0				},1000,function(){					$('#more').removeClass('moreno');				});			}else{				 $('#sider').animate({	     	left:-120	    },1000,function(){				$('#more').addClass('moreno');			});	    }		});	});*///定义页面载入事件	$(function(){		$('#more').addClass('moreno');		//点击界面除了容器id为more的区域外,任何地方隐藏掉		$(document).click(function(){			 $('#sider').animate({	     	left:-120	    },1000,function(){				$('#more').addClass('moreno');			});		});				$('#more').click(function(event){			event.stopPropagation();			//隐藏元素(向左移动)		event.stopPropagation();			if ($('#more').hasClass('moreno')) {				$('#sider').animate({				left:0				},1000,function(){					$('#more').removeClass('moreno');				});			}else{				 $('#sider').animate({	     	left:-120	    },1000,function(){				$('#more').addClass('moreno');			});	    }		});	});	</script>  <div >    	<div >	    	<div >	  		<img id="more" src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/more.png" />	  	</div>	  	<div>    			<img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/main/logo1.png" />    		</div>    	</div>  </div>  <div >	  <div >	  		<div id="lunbo" >		  <ul id="lunboul" >		    <volist name="pic" id="vo">		    	<li >		    		<img src="{$vo['pic']}" alt="" >		    	</li>		    </volist>		  </ul>		</div>		<script type="text/javascript">	$('#lunbo').unslider({		speed: 0,		delay: 3000,		complete: function() {},		keys: true,		dots: true,		fluid: false	});	function autoScroll(obj){ 		$(obj).find("#voo").animate({ 			marginTop : "-30px" 		},500,function(){ 			$(this).css({marginTop : "0px"}).find("li:first").appendTo(this); 		}) 	} 	$(function(){ 		setInterval('autoScroll("#xst")',2000);	 	}) 	</script>  </div>  <div >	  <div id="xst" >			<ul id='voo' >				<volist name='gonggao' id="vo">					<li >						<a href="{:U('/Index/PlatDetail',array('id'=>$vo['id']))}">{$vo['name']}</a>					</li>				</volist>			</ul>					</div>		<div >  		最新公告  	</div>	</div>  <table id="fone" onclick="javascript:location.href='http://www.cnblogs.com//Invest/InvestHp/biao_type/love'">	  <tr>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/new.png"/></td>		  <td >新手标</td>		  <td><span >8-10%</span><span >预期年化收益</span></td>		  <td><span >7<span >天</span></span><span >投资期限</span></td>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/rightshow.png" /></td>	  </tr> 	  </table>  <table onclick="javascript:location.href='http://www.cnblogs.com//Invest/InvestList/biao_type/yxlc'">	  <tr>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/fast.png" /></td>		  <td >快系列</td>		  <td><span >8-10%</span><span >预期年化收益</span></td>		  <td><span >1<span >个月</span></span><span >投资期限</span></td>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/rightshow.png" /></td>	  </tr> 	  </table>  <table onclick="javascript:location.href='http://www.cnblogs.com//Invest/InvestList/biao_type/gxd'">	  <tr>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/stable.png" /></td>		  <td >稳系列</td>		  <td><span >12-14%</span><span >预期年化收益</span></td>		  <td><span >3-6<span >个月</span></span><span >投资期限</span></td>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/rightshow.png" /></td>  		</tr> 	  </table>	<if condition="$GLOBALS['userinfo']['org_code'] eq 'fc'">  <table onclick="javascript:location.href='http://www.cnblogs.com//Invest/InvestList/biao_type/fcb'">	  <tr>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/house.png" /></td>		  <td >房产宝</td>		  <td><span >8-16%</span><span >预期年化收益</span></td>		  <td><span >3-6<span >个月</span></span><span >投资期限</span></td>		  <td ><img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/rightshow.png" /></td>	  </tr> 	  </table>	</if>  <div onclick="javascript:location.href='http://www.cnblogs.com//Goods/Index'">  	<img src="http://www.cnblogs.com//{:APP_PATH}/Public/img/pic/logobean.png"/>  </div>  <div id="sider">  	<ul id="usecond">  	<li > <a href="{:U('Index/Platann')}" >平台公告</a></li>  	<li > <a href="{:U('Index/HelpCenter')}" >帮助中心</a></li>  	<li > <a href="{:U('Index/PlatIntro')}" >平台介绍</a></li>  	<li > <a href="{:U('Index/Contact')}">联系我们</a></li>  	</ul>  </div>  </div><include file="Public:footer" />