jquery------.mouseover()和.mouseout()的高级效果使用
2016-05-13 17:59
501 查看
index.jsp
my.js
效果图
移动前:
移动后:
<div style="width:100%;height:40px;background-color:#aaa;position:absolute;"> <div id="showall" style="text-align:center;line-height:40px;left:600px;width:100px;height:40px;background-color:pink;position:absolute">显示空间</div> </div> <div id="all" style="left:600px;width:100px;height:100px;display:none;position:absolute"> <div id="area1" style="line-height:40px;text-align:center;width:100px;height:40px;background-color:#eee;">显示空间</div> <div id="area2" style="width:96px;height:80px;background-color:#fff;border:2px solid #eee"> <table border="0" cellspacing="0" > <tr> <td style="text-align:center;width:96px;height:30px;border:1px solid #fff">服装</td> </tr> <tr> <td style="text-align:center;width:96px;height:30px;border:1px solid #fff">首饰</td> </tr> </table> </div> </div>
my.js
$(document).ready(function(){ $("#showall") .mouseover(function(){ $("#all").show(); }); $("#all").mouseout(function(){ $("#all").hide(); }) .mouseover(function(){ $("#all").show(); }); });
效果图
移动前:
移动后:
相关文章推荐
- 【B/S】引用Google或微软的CDN加载jQuery
- jquery 选择器
- 【笔记】 《js权威指南》- 第19章 JQuery类库 - 19.2 JQuery getter setter
- 【B/S】jQuery简介及语法
- jquery中的each用法以及js中的each方法实现实例
- 利用jquery制作滚动到指定位置触发动画
- jquery选择器篇
- 原生js和jquery分别实现横向导航菜单效果
- 实例讲解Jquery中隐藏hide、显示show、切换toggle的用法
- 利用jQuery对插件进行扩展时,方法$.extend()、$.fn.extend()区别与联系
- 基于jquery插件实现拖拽删除图片功能
- PHP Jquery
- Jquery table
- jQuery配合coin-slider插件制作幻灯片效果的流程解析
- jquery、js获取页面高度宽度等
- 使用jQuery制作浮动工具栏的实例分享
- jquery获取input表单值的代码
- jQuery使用ajaxSubmit()提交表单以及AjaxSubmit的一些用法
- 使用jquery dataTable
- jQuery Easyui 验证两次密码输入是否相等