This article mainly introduces the effects of jquery prompts, and analyzes the implementation methods and precautions of jQuery prompts in a simple example in detail, which has some reference value, for more information about jquery prompts, see the examples in this article. Share it with you for your reference. The specific implementation method is as follows:
The Code is as follows:
Tip 1.
Tip 2.
Built-in prompt 1.
Built-in prompt 2.
$ (Function (){
$ (". Tooltip"). mouseenter (function (e ){
This. mytitle = this. title
This. title = ""
Var a ="
"+ This. mytitle +"
"
$ ("Body"). append ();
$ ("P" ).css ({
"Top": (e. pageY + y) + "px ",
"Left": (e. pageX + x) + "px"
}). Show ("fast ")
}). Mouseout (function (){
This. title = this. mytitle;
$ ("P"). remove ();
});
})
Experience:
Do not append the p element to the p tag. A large deviation value is displayed!
Originally! This is different from $ ("this. rewrite the title to $ ("this "). attr ("title") will make the following mouseout event unable to access the saved title.
I hope this article will help you with jQuery programming.