jquery实现帮侧悬浮可收缩层
来源:互联网 发布:php购物车提交订单 编辑:程序博客网 时间:2024/04/29 01:20
javaScript代码
<script type="text/javascript">
$(document).ready(function(){
/*
返回值:jQuerybind(type,[data],fn)
type,[data],function(eventObject)String,Object,FunctionV1.0
type: 含有一个或多个事件类型的字符串,由空格分隔多个事件。比如"click"或"submit",还可以是自定义事件名。
data:作为event.data属性值传递给事件对象的额外数据对象
fn:绑定到每个匹配元素的事件上面的处理函数
为每个匹配元素的特定事件绑定事件处理函数。
*/
$("#floatShow").bind("mouseenter",function(){
//自定义动画函数 opacity透明度
$("#onlineService").animate({width:"show", opacity:"show"}, "normal" ,function(){
$("#onlineService").show();
$("#floatShow").attr("style","display:none");
$("#floatHide").attr("style","display:block");
});
});
$("#floatHide").bind("mouseup",function(){
$("#onlineService").animate({width:"hide", opacity:"hide"}, "normal" ,function(){
$("#onlineService").hide();
$("#floatShow").attr("style","display:block");
$("#floatHide").attr("style","display:none");
});
});
$("#layer").bind("mouseup",function(){
$("#onlineService").animate({width:"hide", opacity:"hide"}, "normal" ,function(){
$("#onlineService").hide();
$("#floatShow").attr("style","display:block");
$("#floatHide").attr("style","display:none");
});
});
});
</script>
css代码
<style type="text/css">
/* online */
#layer{z-index:9999;position:fixed;right:0px;top:0;margin:0px 0 0 0;padding-right: 1px;}
#layer{position:absolute;top:expression(eval(document.documentElement.scrollTop));}
#tab{width:0px;float:left;margin:80px 0 0 0;position:relative;z-index:9;}
#onlineService{display:inline;float:left;display:none;padding:1px 0 0 0;}
</style>
html代码
<div id="layer" >
<div id="tab">
<a id="floatShow" title="点击弹出" style="display:block;" href="javascript:void(0);"><font color="black" size="4px" ><strong style="background-color: #E0E0E0;">部门列表</strong></font></a>
<a id="floatHide" title="点击收回" style="display:none;" href="javascript:void(0);"><font color="white" size="5px"><strong>部门列表</strong></font></a>
</div>
<div id="onlineService">
<div class="onlineMenu" >
<table class="jtr" style=" background-color:#FCF4DF;">
<tr>
<td bgcolor="d3eaef" class="STYLE10">
</td>
<td bgcolor="d3eaef" class="STYLE6" >
<div align="center">
<span class="STYLE10">部门</span>
</div>
</td>
</tr>
<s:iterator value="hashMap" status="va" var="map">
<tr <s:if test="#va.Even"> style="background-color:#E4F3FB;" </s:if>>
<td height="20" class="STYLE19">
<div align="center">
</div>
</td>
<td height="20" class="STYLE19">
<div align="left">
<a href="TelphoneAction?key=<s:property value="#map.key" />"> <s:property value="#map.value" /></a>
</div>
</td>
</tr>
</s:iterator>
</table>
</table>
</div>
注:记得导jquery库。
- jquery实现帮侧悬浮可收缩层
- JQuery实现悬浮层
- jquery实现的可隐藏重现的靠边悬浮层
- jQuery实现网页右下角悬浮层提示
- 《JavaWeb---JQuery实现可收缩的级联菜单》
- 使用html和jquery实现左侧可收缩导航栏
- jQuery实现DIV层的收缩展开效果
- jquery ui 实现弹层,无遮罩,可拖动,可缩放
- 可移动悬浮窗口实现
- 如何实现悬浮层效果
- CSS—实现悬浮层
- jquery实现表格的收缩
- jquery实现文章内容展开收缩
- QQ分组实现,可收缩---ExpandableListView
- javaScript的可收缩菜单的实现
- jQuery 实时汇率转换 悬浮层
- jQuery实现鼠标悬浮在div上时候动态浮动另外一个div层盖住第一个div层
- WindowManager实现悬浮窗口&可自由移动的悬浮窗口
- hadoop 大数据开发3---HBase 安装步骤
- linux中搭建MongoDB Replset
- Jump Game II
- rqnoj 496 [IOI1999]花店橱窗布置 (简单dp)
- WinDBG 的首选资源
- jquery实现帮侧悬浮可收缩层
- 20个Android很有用的代码片段
- RHEL6 修改口令报错passwd: Authentication token manipulation error
- php调试与优化
- 海量数据处理 ——bloom filter
- HDU/HDOJ 1241 Oil Deposits (DFS)深度优先搜索
- [Eclipse]win下设置源码文件编码为UTF8
- java实现安全散列算法SHA
- 第七次上机报告