点击页面任何位置隐藏div
<include file="Public:header" />
<style type="text/css">
table{width:100%;margin: 0;}
</style>
<script type='text/javascript' src="/{: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 class="header_one">
<div class="Central">
<div class="first_one" style="position:absolute;">
<img id="more" style="margin-top:8px;" src="/{:APP_PATH}/Public/img/pic/more.png" />
</div>
<div>
<img style="height:30px;" src="/{:APP_PATH}/Public/img/main/logo1.png" />
</div>
</div>
</div>
<div class="bg">
<div class="pic" style="height:180px;">
<div id="lunbo" style="overflow: hidden;">
<ul style="margin:0px;" id="lunboul" style="position: relative;">
<volist name="pic" id="vo">
<li style="float:left;text-align:center;">
<img src="{$vo['pic']}" alt="" style="height:176px;margin:auto;" >
</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 style="width:100%;background-color:#EEEEEE;height:30px;margin:10px 0;">
<div class="scroll" id="xst" style="float:right;margin-left:10px;height:30px;width:75%;overflow:hidden;">
<ul id='voo' style="margin-top:0px;">
<volist name='gonggao' id="vo">
<li style="line-height:30px;height:30px;padding-left:5px;padding-top:2px;text-align:left;">
<a href="{:U('/Index/PlatDetail',array('id'=>$vo['id']))}">{$vo['name']}</a>
</li>
</volist>
</ul> </div>
<div style="float:right;margin:5px 0;">
最新公告
</div>
</div>
<table id="fone" onclick="javascript:location.href='/Invest/InvestHp/biao_type/love'">
<tr>
<td class="norrow"><img src="/{:APP_PATH}/Public/img/pic/new.png"/></td>
<td class="secon">新手标</td>
<td><span class="blo">8-10%</span><span class="tblo">预期年化收益</span></td>
<td><span class="blo">7<span class="cao_one">天</span></span><span class="tblo">投资期限</span></td>
<td class="jian_rig"><img class="rig_pic" src="/{:APP_PATH}/Public/img/pic/rightshow.png" /></td>
</tr>
</table> <table class="bird" onclick="javascript:location.href='/Invest/InvestList/biao_type/yxlc'">
<tr>
<td class="norrow"><img src="/{:APP_PATH}/Public/img/pic/fast.png" /></td>
<td class="secon">快系列</td>
<td><span class="blo">8-10%</span><span class="tblo">预期年化收益</span></td>
<td><span class="blo">1<span class="cao_one">个月</span></span><span class="tblo">投资期限</span></td>
<td class="jian_rig"><img class="rig_pic" src="/{:APP_PATH}/Public/img/pic/rightshow.png" /></td>
</tr>
</table> <table class="se_cond" onclick="javascript:location.href='/Invest/InvestList/biao_type/gxd'">
<tr>
<td class="norrow"><img src="/{:APP_PATH}/Public/img/pic/stable.png" /></td>
<td class="secon">稳系列</td>
<td><span class="blo">12-14%</span><span class="tblo">预期年化收益</span></td>
<td><span class="blo">3-6<span class="cao_one">个月</span></span><span class="tblo">投资期限</span></td>
<td class="jian_rig"><img class="rig_pic" src="/{:APP_PATH}/Public/img/pic/rightshow.png" /></td>
</tr>
</table>
<if condition="$GLOBALS['userinfo']['org_code'] eq 'fc'">
<table class="last_fcb" onclick="javascript:location.href='/Invest/InvestList/biao_type/fcb'">
<tr>
<td class="norrow"><img src="/{:APP_PATH}/Public/img/pic/house.png" /></td>
<td class="secon">房产宝</td>
<td><span class="blo">8-16%</span><span class="tblo">预期年化收益</span></td>
<td><span class="blo">3-6<span class="cao_one">个月</span></span><span class="tblo">投资期限</span></td>
<td class="jian_rig"><img class="rig_pic" src="/{:APP_PATH}/Public/img/pic/rightshow.png" /></td>
</tr> </table>
</if>
<div class="bott_ton" onclick="javascript:location.href='/Goods/Index'">
<img src="/{:APP_PATH}/Public/img/pic/logobean.png"/>
</div>
<div id="sider">
<ul id="usecond">
<li style="line-height:36px"> <a href="{:U('Index/Platann')}" style="color:#FFF">平台公告</a></li>
<li style="line-height:36px"> <a href="{:U('Index/HelpCenter')}" style="color:#FFF">帮助中心</a></li>
<li style="line-height:36px"> <a href="{:U('Index/PlatIntro')}" style="color:#FFF">平台介绍</a></li>
<li style="line-height:36px"> <a href="{:U('Index/Contact')}"style="color:#FFF">联系我们</a></li>
</ul>
</div>
</div>
<include file="Public:footer" />

点击页面任何位置隐藏div的更多相关文章
- JS 实现点击页面任意位置隐藏div、span
通过调用下面的 showhidden(“标签ID”) 显示div/span/…等标签内容,可以实现点击页面任意地方再次隐藏该标签内容,而showhidden(“标签ID”,”nohidden”)可保存 ...
- jquery点击页面其他位置隐藏div
$("#btnAdd").on('click', function (e) { $("#setUp").toggle(); $(document).one('c ...
- 点击页面其它地方隐藏div所想到的jQuery的delegate
在网页开发的过程中经常遇到的一个需求就是点击一div内部做某些操作,而点击页面其它地方隐藏该div.比如很多导航菜单,当菜单展开的时候,就会要求点击页面其它非菜单地方,隐藏该菜单. 先从最简单的开始, ...
- 由点击页面其它地方隐藏div所想到的jQuery的delegate
对于这个问题一般有两种思路,这两种思路都会利用事件冒泡这一原理,想要详细了解Javascript事件机制可以看看JavaScript与HTML交互——事件,这不是本文重点,所以这里只是简单介绍一下事件 ...
- html js点击按钮滚动跳转定位到页面指定位置(DIV)的方法代码
一:通过html锚点实现滚动定位到页面指定位置(DIV): 如果我们要点击实现跳转的地方是一个html锚点,也就是点击一个A标签超链接实现跳转,可以把A标签的href属性直接指向跳转指定位置的d ...
- jquery实现点击页面其他地方隐藏指定元素
代码实例如下: <!DOCTYPE html><html><head><meta charset=" utf-8"><meta ...
- jQuery 实现点击页面其他地方隐藏菜单
点击页面其它地方隐藏id为messageList的div 代码: $('body').delegate("#message", 'click', function(e) { var ...
- contains 之 点击元素外位置隐藏元素
contains 之 点击元素外位置隐藏元素 api: contains 检测一个元素包含在另一个元素之内 详解:http://www.runoob.com/jquery/misc-contai ...
- 点击页面其它地方隐藏该div的两种思路
思路一 第一种思路分两步 第一步:对document的click事件绑定事件处理程序,使其隐藏该div 第二步:对div的click事件绑定事件处理程序,阻止事件冒泡,防止其冒泡到document,而 ...
随机推荐
- Senparc.Weixin.MP SDK 微信公众平台开发教程(十):多客服接口说明
微信官方的多客服接口原理是通过用户发送的信息,开发者服务器返回一条指定类型的响应信息,使用户的对话状态切换到官方的多客服状态(持续一段时间),这段时间内用户发送的所有信息都不会到达开发者的服务器,而是 ...
- Linux 容器技术史话:从 chroot 到未来
Linux 容器是一个在单一 Linux 主机上提供多个隔离的 Linux 环境的操作系统级虚拟技术.不像虚拟机(VM),容器并不需要运行专用的访客(guest)操作系统.容器们共享宿主机的(host ...
- EF架构~CodeFirst数据迁移与防数据库删除
回到目录 本文介绍两个概念,防数据库自动删除,这是由于在code first模式下,当数据实体发生变化时,会对原来数据库进行删除,并将新数据表添加进来,但这对于我们的运营环境数据库,是万万不能接受的, ...
- 360路由器刷openwrt后设置wifi中继
上一篇文章(360路由器刷openwrt.不死uboot.双系统 .wifi中继 - 飞鸿影~ - 博客园)讲了如何在360路由器C301上安装openwrt以及安装双系统.这篇文章讲如何设置无线中继 ...
- Atitit 实现java的linq 以及与stream api的比较
Atitit 实现java的linq 以及与stream api的比较 1.1. Linq 和stream api的关系,以及主要优缺点1 1.2. Linq 与stream api的适用场景1 1. ...
- 将图片的二进制字节 在HTML页面中显示
两种方法: 后端的一般处理程序:Imge.ashx using System; using System.Collections.Generic; using System.Linq; using S ...
- InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET程序)
InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET程序) 标签: InstallShieldVS2013 2015 ...
- IE和firefox火狐在JS、css兼容区别
1.firefox不能对innerText支持. firefox支持innerHTML但却不支持innerText,它支持textContent来实现innerText,不过默认把多余的空格也保留了. ...
- 设为首页 和 收藏本站js代码 兼容IE,chrome,ff
设为首页 和 收藏本站js代码 兼容IE,chrome,ff //设为首页 function SetHome(obj,url){ try{ obj.style.behavior='url(#defau ...
- PHP的学习--PHP的闭包
php的闭包(Closure)也就是匿名函数,是PHP5.3引入的. 闭包的语法很简单,需要注意的关键字就只有use,use是连接闭包和外界变量. $a = function() use($b) {} ...