/ / Bootstrap Tooltip: create tooltips

Bootstrap Tooltip: create a tooltip

How to make your site attractive tovisitors? This question worries almost all owners of Internet resources: merchants, bloggers, small and large business owners, travelers and just creative people who have something to tell the world.

Why should the site be beautiful and functional?

The number of visits depends on the subject matter of the site andits target audience, people's interest in a particular product, investments, promotion, fillability and many other factors. But it can not be denied that the site "meets on clothes". It is the first and the main page of the resource that is his face, the visiting card on which the visitor should understand whether he wants to spend his time on further viewing the content.

bootstrap tooltip

And there is no right to make a mistake!According to the research of one of the technical universities of the United States, the first impression of the site is the visitor's appearance in less than a second. On average, a person "scans" the site in 3 seconds. Lightning speed, is not it ?!

From what the main page looks like, it dependsup to 70% of resource success. The first thing that people pay attention to is the logo, and the second is navigation. And if the logo is more or less clear, then it's worth breaking your head above the navigation, the menu and the convenience of the ergonomics of the site. There is a reasonable question: "How to decorate your site, make it as functional and convenient as possible, but beautiful?" There are a lot of unusual ideas that can be offered, but one of the most interesting ones is pop-up tips.

What are the tooltips?In addition to being an excellent mechanism for improving the functionality of the site, tooltips are a tool that allows a user to hover over an icon, word or picture to see an explanation of an image.

Tools for working with tooltips

Bootstrap can be used to create a tooltip. This is an easy-to-learn set of templates for creating applications and sites written in HTML, CSS, Sass and JavaScript.

bootstrap tooltip does not work

If you specify, then for the tooltips one of the graphic elements of the Bootstrap - Tooltip template is used.

The Bootstrap framework was created for "Twitter" andwas originally called "Twitter Blint." After some changes in 2012, he received a grid of 12 columns, became adaptive and acquired the familiar name - Tooltip. A tooltip is an element that pops up when you hover over a specific item on the monitor screen.

Create a card

You can create a Bootstrap Tooltip prompt whenhelp with data attributes, and also by activating Java Java Script elements. There are two main ways to create an HTML Bootstrap Tooltip. The essence of the first is the use of the data-toggle = "tooltip" attribute and the title attribute, which will contain the help text. The tooltip will pop up from the top (default setting). It is worth remembering that the hint needs initialization, since automatic initialization is canceled in "Twitter bootstrap" for reasons of performance increase.

bootstrap tooltip example

In order to initialize the prompts,special JavaScript is used, in which for all elements that have the data-toggle = "tooltip" attribute, the tooltip method is restored. The essence of the second method is to activate java script using the jQuery library tool by writing a tool class that includes a hint. The method is similar to the first, except for the method of selecting the elements. Include tips in the "Java Script" in the manner shown below.

Script

Example of bootstrap tooltip

There are four basic options for the location of tooltips: on the left and right edges, and also on the top and bottom of the element.

Script from the top

Hint from the top

Tooltip to the right
Tooltip to the right

Hint at the bottom
Hint at the bottom

Tooltip on the left
Tooltip on the left

Closing script

Applying Tooltips

There are many uses of the Bootstrap Tooltip.You can insert tooltips so that the user can understand the translation of the text from a foreign language in the text. Also, hints can be used as a tool that will help the user to understand the meaning of the buttons on the panel when hovering over them. Bootstrap Tooltip templates are often used on the websites of various organizations to create a subscription to the company's news. This allows you to keep customers informed, and also provides an opportunity for visitors to receive new information, such as the amounts of discounts, offers, changes within the company.

bootstrap tooltip html

Consider an example where the user needsenter your email address in order to subscribe to the newsletter. The task of providing a client audience subscription for news is most easily achieved by using HTML5 and the required attribute. The tooltip in this case is needed in order for the user to understand the sequence of actions. For example, after entering the e-mail address, I checked the box: "I agree to receive the company's news by e-mail". Below is an example of the form code.

Tooltip

To enter such code in HTML Bootstrap Tooltip does not make special work. But the benefit from it is considerable. Now consumers know all the news of the company. This is a kind of free advertising.

bootstrap tooltip html content

Basic errors when creating tooltips

What should I do if the Bootstrap Tooltip does not work?The first and the main error, in which the tooltip attribute will not work, is the tooltip is not included. In order to activate it, you need to use a special code.

Initializing Tooltips

This method allows you to initialize all the tooltips on the web page.

The second common mistake is the lack of jQuery in the header.

Tooltips

For competent work of the link there is a necessary condition - the data processing function like "Java Script" should be specified.

Java script

Tooltip Properties

At its core, the Tooltip component is designed forDisplay hints when you hover the mouse over a section of the page. But, in addition to the location of the hint to the right, left and top with data-toggle = "tooltip", the tooltip has these properties:

  • Active. Using the true properties in the Bootstrap Tooltip allows you to display hints, in turn, the value false for the same property means that you can not display hints.
  • AutoPopDelay is the time at which prompts are displayed.
  • AutoPopDelay. This is the time period during which the mouse cursor should be pointed at the element, so that a tooltip appears.
  • IsBaloon. If the value of the HTML Bootstrap Tooltip is true, then the prompt box will look like a cloud.
  • ToolTipIcon. It is a symbol that is displayed in the hint window.

bootstrap tooltip html true
Tooltipster

In order to create beautiful pop-upshints, for example, on the site created on Wordpress, it is not necessary to thoroughly know the language of web developers. It is enough to know about the existence of such a plugin (extension) as Tooltipster. From the title it is clear that this plugin is based on the Tooltip and is surprisingly similar in its properties and purpose. What is this plugin for? It allows you to create the necessary HTML markup inside the tooltip.

Tool tips example

The work of the plugin is based on the insertion of shortcuts onpage. It contains all the basic attributes of HTML Bootstrap Tooltip: content (data-tooltip-content), title, position, trigger, etc. This allows you to change the theme, font, tooltip size, color, insert a picture and do much more.

Liked:
0
Popular Posts
Spiritual development
Food
yup