Bootstrap plug-in 1 -- tooltip

Source: Internet
Author: User

Before introducing Bootstrap. JS, we need to introduce jquery JS files.

Both the bootstrapplug-in and the bootstrap.css core files are used.

This section describes how to use tooltip information plug-ins.

<A href = 'javascript:; 'rel = 'tooltip 'Title = 'information I am prompted' class = 'btn BTN-Primary '> click here to display the prompt message </a>

Call method:

<SCRIPT>

$ (Function (){

$ ("A [rel = 'tooltip ']"). tooltip ();

})

</SCRIPT>

In this way, the tooltip information is automatically displayed above the corresponding element.

So what if I want to display this prompt in other places?

Simple:

The property of the control orientation isData-replacement= '? '? YesTop, bottom, left, right

<A href = 'javascript:; 'rel = 'tooltip 'data-original-Title = 'tooltip on bottom'Data-placement = 'bottom'Class = 'btn BTN-Primary '> click to display the prompt message </a>

By the way, the data-original-title attribute has the same effect as the title attribute. If the two attributes are defined at the same time, only the prompt content of the title attribute is displayed.

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.