Jquery. cvtooltip. js jquery-based Bubble tip plug-in _ jquery

Source: Internet
Author: User
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. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.