自学MVC(八):在jquery里让DIV随鼠标移动-2009年05月15日
2009-06-20 15:24
281 查看
<script language="javascript" type="text/javascript">
$(function() {
$("#upLower").mousemove(function() {
$("#toolTip").css({ top: event.clientY + 5, left: event.clientX + 10 });//event.clientY 鼠标所在的坐标的Y轴
});
})
</script>
<div id="toolTip" style="width:120px;"></div> //跟随鼠标移动的层
<li id="upLower"> //在其上触发onmousemove事件
</li>
$(function() {
$("#upLower").mousemove(function() {
$("#toolTip").css({ top: event.clientY + 5, left: event.clientX + 10 });//event.clientY 鼠标所在的坐标的Y轴
});
})
</script>
<div id="toolTip" style="width:120px;"></div> //跟随鼠标移动的层
<li id="upLower"> //在其上触发onmousemove事件
</li>
相关文章推荐
- JQuery鼠标移动到div上,显示提示
- Jquery实现鼠标移动div
- jquery div 跟随鼠标移动
- jQuery实现div跟随鼠标移动
- 基于jquery的用鼠标画出可移动的div
- jquery 实现鼠标点击div盒子移动功能
- jquery让div隐藏,显示,随着鼠标移动
- jQuery鼠标移动到Div上后切换背景,或更换图片
- jQuery鼠标随意移动div
- jquery鼠标随意移动div
- jquery div 跟随 鼠标 移动
- jquery鼠标移动div内容上下左右滚动
- jQuery操作表格背景色迭代和鼠标移动事件(CSS中使用expression)
- JS中DIV随鼠标移动的事件
- jQuery实现鼠标点击Div区域外隐藏Div
- jQuery实现鼠标移动到表格上时变色
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字
- 用jQuery实现鼠标在table上移动进行样式变化
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字 .