JQuery Easyui tutorial-tooltip (hint box)

Source: Internet
Author: User
The previous article introduced the jquery Easyui Tutorial-progressbar (progress bar), the component front-end developers in the work of general use, and then to introduce the Jquery-tooltip (cue box) components, in the work process is also very useful.

This article gives you a detailed account of the use case of jquery-tooltip (cue box), and through the step-by-step code implementation process, not only let you master the implementation of the ToolTip, but also enhance your development work in the front-end programming interest and level.

Use $.fn.tooltip.defaults to override the default value object. (Translator Note: The new plugin in version 1.3.3)

When the user moves the mouse over the element, a message prompt appears. The contents of the prompt box can be any HTML element in the page or send a background request via AJAX to get the contents of the ToolTip.

Use case:

Create a prompt box

Create a prompt box with two ways to label and JavaScript.

1. Add a "Easyui-tooltip" class name to the element by creating a hint box with the tag, without any JavaScript code.

<a href= "#" title= "This is the ToolTip message." Class= "Easyui-tooltip" >hover me</a>

2. Create a cue box from JavaScript.

<a id= "dd" href= "javascript:void (0)" >click here</a>
$ (' #dd '). ToolTip ({position: ' Right ', content: ' <span-style= "color: #fff" >this is the "the ToolTip Message.</span > ', Onshow:function () {$ (this). ToolTip (' Tip '). css ({backgroundcolor: ' #666 ′,bordercolor: ' #666});});

Property:

Event:

Method:

The above is the jquery Easyui tutorial-tooltip (hint box) content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • Related Article

    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.