Home  >  Article  >  Web Front-end  >  A simple mouse following prompt effect based on JQuery_jquery

A simple mouse following prompt effect based on JQuery_jquery

WBOY
WBOYOriginal
2016-05-16 18:19:201448browse

1. The effect is as shown in the picture

 

2. Implementation ideas

1 Move the mouse into the title (here is the tag)

Create a div whose content is the text at the mouse position

Add the created div to the document

Set the position for the prompt layer

 2 Move the mouse out of the title

Remove div

 3 When the mouse moves within the title

Same as adding div effect

3.JQuery implementation code

Copy code The code is as follows:















The code is very simple and mainly uses JQuery The three events are mouseover, mouseout, mousemove.
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