Home > Web Front-end > JS Tutorial > jQuery implements floating display of picture information example code_jquery

jQuery implements floating display of picture information example code_jquery

WBOY
Release: 2016-05-16 17:24:17
Original
1075 people have browsed it

如图:
jQuery implements floating display of picture information example code_jquery 

复制代码 代码如下:






<script> <br>$(function(){ <br>var x = 10; <br>var y = 20; <br>$("a.tooltip").hover(function(){ <br>var title = this.title; <br>$("a.tooltip").attr("newTitle",this.title); <br>this.title = ''; <br>var $div = $("<div id='newTip'><img src='" this.href "'/><br/>" this.newTitle "</div>"); <br>$("body").append($div); <br>$div.css({"position":"absolute","background":"silver"}).show("fast"); <br>},function(){ <br>this.title = this.newTitle; <br>$("#newTip").remove(); <br>}).mousemove(function(e){ <br><br>var $div = $("#newTip").css({"left":(e.pageX x) 'px',"top":(e.pageY y) 'px'}).show("fast"); <br>}); <br>}) <br></script>



  • 苹果 iPod

  • 苹果 iPod nano

  • 苹果 iPhone

  • 苹果 Mac




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