Collation
1. In the plug-in name cvtooltip, cv is the abbreviation of ChinaValue, and tooltip is the prompt.
2. this function is applicable to new function prompts, user prompts, instant message prompts, Operation Failure prompts (no one stops after the operation is successful), and so on. It is implemented using css without any image files attached.
3. The problems found at present are not very good in Chorme because Chrome parses pages differently from IE and FF, resulting in different position or offset return values of jquery.
4. This plug-in is still an exercise. The force of one person may cause errors.
Instance demo
1. When loading the page, the bubble prompt is displayed. Please move your eyes to the first section.
2. click the button and a bubble prompt is displayed. Note that the prompt cannot be closed. The prompt will disappear after two seconds. I am a link
3. Call the function to disable the bubble action. Click me again
Parameters
Panel: "body", // this parameter is the container for loading bubble prompts. Different values may lead to different computing positions.
Selector: "", // control used to calculate Positioning
Direction: 0, // arrow direction
Width: 300, // The width of the bubble prompt, Which is set manually.
Left: 0, // left margin of the panel Parameter
Top: 0, // The top margin of the panel Parameter
Delay:-1, // delay is disabled, in milliseconds. If the value is 0, it indicates immediate shutdown.
Speed: 300, // The effect when disabled, fade out speed
Close: true, // whether to display the close button
Callback: function (){
$. Noop (); // event after you click Close
}
Usage and source code
This will not be pasted. You can view the source file on the page. In JS, you can also find it clearly, or click here to download it.
Piens
When a bubble prompt is displayed, a prompt object is displayed. The default position is calculated based on the body. The disadvantage is that if the page content changes, the position of the bubble remains unchanged, leading to a failure in prompting the target.
In this case, the selector parameter is provided to ensure that the bubble changes as the position of the selector control changes.
Package and download js files
Original address http://www.cnblogs.com/0417/archive/2010/11/17/1880293.html