Hit enter after type your search item

A jQuery tooltip plugin – powertip with setting up guide and demos

The tooltip plugin for jQuery

The powertip plug-in is based on jQuery that can be used for creating nice looking tooltips for your web projects.

You may create tooltips in different directions as the plug-in developer calls it: North West, North, North East, East, South West Alt and others. You may display tooltips on mouse hover or click states that can be used for different elements like buttons, paragraphs etc.

See the following demos along with the setup guide for using this jQuery tooltip plugin.

A demo of setting up and using powertip – tooltip plugin

In the demo, a number of buttons are created with different placement options available in the plug-in. Not to mention, the title text of the button becomes the tooltip. You may use different options as per requirement for specifying the direction of the tooltip. For example, ‘n’ means north, ‘e’ for East, nw-alt for north-west-alt and so on. See the demo along with code (I have used Bootstrap buttons so included the CSS file of Bootstrap).

jQuery power tooltip

See online demo and code

Following is the buttons code used:


 

This is the jQuery script for specifying the options and calling the plug-in:


 

For setting up this plug-in for your web pages, you need to include a few JS files that are packaged with the downloaded zip file, that you may get from the credit link (from Github) website. (credit – stevenbenner)

You may also download these files by view source the demo page and saving the required files in your system. The required files are:

  • jquery-1.12.3.js
  • core.js
  • csscoordinates.js
  • displaycontroller.js
  • placementcalculator.js
  • tooltipcontroller.js
  • utility.js
  • jquery.powertip.css

Apparently, these are many as for as a tooltip functionality is required. However, the size is tiny for many files.

Get the complete code of the example in the demo page.

A demo of tooltip following mouse

In this example, a tooltip is created in a <div> tag where it follows the mouse movement. Again, the tooltip text is given in the title attribute of a div element. See the live demo:

jQuery power tooltip mouse-follow

See online demo and code

By using the followMouse option in the jQuery code as true, you may create tooltips following the mouse movement for any element:

$(‘#mousefollow-examples div’).powerTip({ followMouse: true });

A demo of tooltip containing link and other content

You may also create tooltips that contain content that a user can interact with. For example, it may contain links or images etc. In above example, you can only read the tooltip, however, in this demo a user may interact with its content as well:

jQuery power tooltip HTML

See online demo and code

The intractable content can be created by using the tipContent option of the plug-in. For example:


 

See the complete code on the demo page.

 

 

This div height required for enabling the sticky sidebar