Home  >  Article  >  Web Front-end  >  Jquery创建层显示标题和内容且随鼠标移动而移动_jquery

Jquery创建层显示标题和内容且随鼠标移动而移动_jquery

WBOY
WBOYOriginal
2016-05-16 17:02:11916browse
复制代码 代码如下:

//引入Jquery

";
$("body").append(tooltip);
$("#tooltip").css({ "top": (e.pageY + y) + "px", "left": (e.pageX + x) + "px" }).show("fast");
}).mouseout(function () { //当鼠标指针从元素上移开时
this.title = this.myTitle;
$("#tooltip").remove();
}).mousemove(function (e) { //当鼠标指针从元素上移动时
$("#tooltip").css({ "top": (e.pageY + y) + "px", "left": (e.pageX + x) + "px" });
});
});

//html代码

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn