Home > Web Front-end > JS Tutorial > jquery prompt effect example analysis_jquery

jquery prompt effect example analysis_jquery

WBOY
Release: 2016-05-16 16:30:29
Original
1300 people have browsed it

The example in this article describes the usage of jquery prompt effect. Share it with everyone for your reference. The specific implementation method is as follows:

Copy code The code is as follows:

tip 1.


Tip 2.


Built-in tip 1.


Built-in tip 2.

$(function(){
$(".tooltip").mouseenter(function(e){
this.mytitle=this.title
this.title=""
var a="

" this.mytitle "
"
$("body").append(a);
$("div").css({
"top": (e.pageY y) "px",
"left": (e.pageX x) "px"
}).show("fast")
}).mouseout(function(){
this.title= this.mytitle;
$("div").remove();
});
})

Experience:

Do not add div elements under the p tag, as a large deviation will occur!

It turns out! This and $("this") are different. If this.title above is rewritten as $("this").attr("title"), the following mouseout event will not be able to access the saved title.

I hope this article will be helpful to everyone’s jQuery programming.

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