一个跟随鼠标移动的DIV
2012-01-10 10:41
519 查看
$(".personList td img").each(function () {
var xOffset = 0;
var yOffset = 0;
var $this = $(this);
var eid = $this.next().attr("alt");
$this.hover(
function (e) {
var str=getPersonnel(eid);
$("#boxM").css(
{
"top": (e.pageY - xOffset) + "px",
"left": (e.pageX + yOffset) + "px"
}
).fadeIn("slow"); ;
},
function () {
$("#boxM").fadeOut("slow");
}
);
});
});
function getPersonnel(eid) {
$.post("/Ashx/AsynLoad.ashx", { "Action": "LoadPersonnel", "eid": eid },
function (data) {
$("body").append("<div id='boxM'>" + data + "</div>");
});
相关文章推荐
- 如何让一个div跟随鼠标移动
- 第3课 02 JS中级课程-event-事件(跟随鼠标移动的div)
- div跟随鼠标移动
- javascript 跟随鼠标移动的提示框的一个小demo
- javascript DIV跟随鼠标移动
- 百度地图弹出层中的div跟随鼠标移动
- 一款基于TweenMax跟随鼠标单击移动的div
- 分享一个很有意思的js,动态时钟显示,能跟随鼠标移动
- jquery div 跟随 鼠标 移动
- 一款基于TweenMax跟随鼠标单击移动的div
- js中实现div跟随鼠标移动
- 分享一个Unity3D点击模型跟随鼠标移动的小脚本(包括屏幕视图到三维空间的坐标转换)
- [JavaScript]跟随鼠标移动的DIV
- 使用JS制作一个鼠标可拖的DIV(二)——限制区域移动
- 使用JS制作一个鼠标可拖的DIV(三)——移动带图片DIV
- css,js实现在鼠标移动到一个位置在这个位置下面显示一个已经存在的div,这个div的位置随意
- 3D 主角跟随鼠标转向 主角设置x轴摄像机上也挂一个设置y轴,按下q随机设置天空盒子和光照,主角移动
- 鼠标拖动div,div跟随鼠标移动效果
- 跟随鼠标单击移动的div
- unity3d实现一个人物跟随鼠标点击地面那点就移动那点,实现点击特效加人物动画方向的切换。