Home > Web Front-end > JS Tutorial > body text

Sharp jQuery Chapter 3 Chapter Summary Example_jquery

WBOY
Release: 2016-05-16 18:31:39
Original
1040 people have browsed it
复制代码 代码如下:








<script> <br>var x = 10; <br>var y = 10; <br>$("a.tooltip").mouseover(function (e) { <br>this.myTitle = this.title; <br>this.title = ""; <br>this.imgTitle = this.myTitle ? this.myTitle : "无title"; <br>var tooltip = "<div id='tooltip'><img class='img1' src='" this.href "'/><div class='div1'>" this.imgTitle "</div></div>" <br>$("body").append(tooltip); <br>$("#tooltip").css({ <br>"top": (e.pageY y) "px", <br>"left": (e.pageX x) "px" <br>}).show("fast"); <br>}).mouseout(function () { <br>$("#tooltip").remove(); <br>this.title = this.myTitle; <br>}) <br></script>
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template