A jQuery tooltip plugin

Related tags

Tips tooltipster
Overview

Tooltipster

A flexible and extensible jQuery plugin for modern tooltips by Caleb Jacob and Louis Ameline under MIT license.
Compatible with Mozilla Firefox, Google Chrome, IE6+ and others.
Requires jQuery 1.10+ (or less, see the compatibility note in the doc).
Default css + js files = 10Kb gzipped.

A reminder of options/methods lies below. For detailed documentation, visit http://calebjacob.github.io/tooltipster/

Standard options

animation
animationDuration
content
contentAsHTML
contentCloning
debug
delay
delayTouch
functionInit
functionBefore
functionReady
functionAfter
functionFormat
IEmin
interactive
multiple
plugins
repositionOnScroll
restoration
selfDestruction
timer
theme
trackerInterval
trackOrigin
trackTooltip
trigger
triggerClose
triggerOpen
updateAnimation
zIndex

Other options

(these are available when you use sideTip, the default plugin)

arrow
distance
functionPosition
maxWidth
minIntersection
minWidth
side
viewportAware

Instance methods

close([callback])
content([myNewContent])
destroy()
disable()
elementOrigin()
elementTooltip()
enable()
instance()
on, one, off, triggerHandler
open([callback])
option(optionName [, optionValue])
reposition()
status()

Core methods

instances([selector || element])
instancesLatest()
on, one, off, triggerHandler
origins()
setDefaults({})

Events

after
before
close
closing
created
destroy
destroyed
dismissable
format
geometry
init
state
ready
reposition
repositioned
scroll
start
startcancel
startend
updated

sideTip events

position
positionTest
positionTested

Comments
  • tooltipster not working in IE8 or IE11 - RESOLVED

    tooltipster not working in IE8 or IE11 - RESOLVED

    Hello, I can get this to work with a hover and content attribute in Chrome or Firefox, but not at all in IE. Caleb's hover sample on the Tooltipster page works in IE - the one that shows HTML text and an image of chocolate soufflé, but not for me. I am trying to accomplish that same type of thing, but have patterned my attributes very similarly to no avail. If anyone can shed light on this, it would be nice. On the Tooltipster home page, one of the list items shows Fixed Position and Width. It's this type of sample I'm trying to replicate. Thank you!

    opened by NewWorldMan 31
  • Is there a way for automatic

    Is there a way for automatic "live" binding ?

    Hello.

    I love your plugin and I want to use it instead bootstrap or foundation tooltip's plugin.

    Bootstrap allow you to show the tooltips after new ajax content in this way:

    $('body').tooltip({
        selector: '[rel=tooltip]'
    });
    

    It is possibile? There is a way, now?

    enhancement 
    opened by diegoviola1 30
  • Support tooltips inside scrollable areas

    Support tooltips inside scrollable areas

    Is it possible to have the tooltip scroll-able on the anchor element as well? When the anchor element moves, the tooltip should move too even if the below is not called.

    $(window).on('scroll.'+ self.namespace +' resize.'+ self.namespace, function() { self.reposition(); }); enhancement 
    opened by fatdem 28
  • Tooltip remains after element disappears... bug?

    Tooltip remains after element disappears... bug?

    I am using Tooltipster on elements within a Fancybox modal. Some of these are on hover and some of these remain visible for form errors. One is used specifically when you hover over the "close box" icon.

    I've discovered that when you close the Fancybox, the tooltips remain on the screen. This is unavoidable when you use the close icon which also contains its own "close box" tooltip. It remains on screen with absolutely no way to get rid of it since the original element is no longer available to hover away from.

    I don't know if this is a bug or a feature request. Since the box is closing, you are no longer "hovering" over the "close box" icon... shouldn't the tip automatically disappear too? (bug?)

    As far as the tips that remain on the form errors, I'd like to see those vanish when the form itself vanishes within the closed Fancybox. (feature request?)

    For the time being, I'm targeting each element individually in order to remove the tooltip inside of a Fancybox callback function. This is getting messy really quickly since I see no way to target all tooltips all at once within a parent container.

    $('#each_target').data('plugin_tooltipster').hideTooltip();

    And now I'm finding that if the target's tooltip does not exist, .hideTooltip() throws an error and nothing else works. So to close Tooltips programatically, they have to exist and they have to be targeted specifically. Like I said, this is getting really messy and growing.

    I'm used to qTip2 where I could call a destroy method on any parent container and it simply removed any active Tips, if none, it simply did nothing.

    Thank-you! (qTip2 totally gone from one website so far)

    opened by sparky672 27
  • Tooltip not shown properly the first time

    Tooltip not shown properly the first time

    I have used tooltipster jquery plugin to create another jquery plugin called "ContentShare" but I am stuck with an issue.

    Tooltipster fails to show the content properly for the first time when i call $(element).tooltipster('show') but from the second time onwards it works as it should.

    Go through this link for more understanding. Any help would be appreciated.

    information 
    opened by rampatra 25
  • position-question

    position-question

    On normal Monitors the tooltip finds it position right on the best place. On my iphone the tooltip-beginning oftens lies outside (above) and you can only see the last sentences, if there's a lot of text. I want to have it allways taking the best place so that you can start reading the tooltip with the beginning and scroll (by touch) down to the rest of it. How do I have to you the options to get that.

    Kind regards glupto

    opened by glupto 24
  • Is it possible to have multiple instances on one element?

    Is it possible to have multiple instances on one element?

    I'd like to have two different tooltips on the same element. One triggered by hovering it. And the second should be an interactive one, triggered by clicking on the element.

    Is it possible to achieve this behaviour with tooltipster?

    opened by ben-eSM 21
  • The tooltip doesn't appear on prestashop cms

    The tooltip doesn't appear on prestashop cms

    Hi louisameline I've seen that the index.html has a little error //code.jquery.com/jquery-1.10.0.min.js should be https://code.jquery.com/jquery-1.10.0.min.js if not I get 2 errors and the plugin doesn't work

    I try to add your plugin on module made for prestashop, looking with firebug all seams ok but the tooltip doesn't appear. I try with simple example like using your example code (like the red square) to avoid possible errors, but the result is the same

    you you want I can give you the url to check its behavior 1 2

    thanks bye

    opened by maofree 20
  • Tooltipster not positioning on SVG path correctly

    Tooltipster not positioning on SVG path correctly

    Hey, awesome plugin!

    I've attached it to an SVG path (created by Raphael) for some dynamic charts, but I've run into a problem positioning the tooltip properly over the curved paths. It's currently positioned off to one side (see image: I'm hovering over the blue path)

    screen shot 2015-03-21 at 3 29 34 pm

    Here's the code used for the tooltip:

    $(maleArc1.node).tooltipster({
         content: 'Male Characters',
         theme: 'tooltipster-shadow'
     });
    

    I read in other issues that there's currently no way to force the tooltip to follow the mouse pointer, but would you be able to suggest an alternative approach to reposition the tooltip? I'm by no means a developer, just good at guessing with code, so any help would be appreciated.

    Thanks!

    opened by jbarkun 20
  • [Mobile] Tooltipster reposition on window resize when keyboard is shown

    [Mobile] Tooltipster reposition on window resize when keyboard is shown

    I have tooltipster element with form. When I trying put text in my field - keyboard on mobile device showed and immediately closed( I cannot focused in the first input field((

    let params =  {
                contentCloning: false,
                theme: 'tooltipster-elfeya',
                side: 'bottom',
                trigger: 'click',
                interactive: true,
            };
    
            if(Device.data.type == 'tablet')
                params.maxWidth = 320;
    
            $.tooltipster.on('created', function(event){
                let origin = event.origin;
                $(origin).addClass('active');
            });
    
            $.tooltipster.on('ready', function(event){
                let target = $(event.tooltip);
                target.find('input[type="text"]:enabled:visible:first').focus();
                console.log(target.find('input[type="text"]:enabled:visible:first').length);
            });
    
            $.tooltipster.on('close', function(event){
                let origin = event.origin;
                $(origin).removeClass('active');
            });
    
            if (Device.data.type == 'smallmobile' || Device.data.type == 'mobile') {
                params.functionPosition = function(instance, helper, position) {
                    position.coord.left = 15;
                     position.size.width = Device.data.windowWidth - 30;
                    return position;
                }
            }
    
            $('#header .mobile-search.tooltipstered').tooltipster(params);
    

    When I comment code in tooltispter.bundle.js, mobile keyboard work correctly, but all the same can't focus in text field when tooltip is ready. When I tap on input field Tooltipster fire reposition method and keyboard is desapear.

    $(env.window)
        // reposition on resize
        // .on('resize.'+ self.__namespace +'-triggerClose', function(e) {
        //  self.reposition(e);
        // })
        // same as below for parents
        .on('scroll.'+ self.__namespace +'-triggerClose', function(e) {
            self.__scrollHandler(e);
        });
    
    opened by romanlex 18
  • Tooltip not show after first click on link

    Tooltip not show after first click on link

    In this case tooltip show only after second click on element:

            var initTooltipster = function(container) {
                $('.tooltip', container || document).tooltipster({
                    theme: 'tooltipster-shadow',
                    contentAsHTML: true,
                    interactive: true,
                    trigger: 'click',
                    functionBefore: function(instance, helper) {
                        var self = $(helper.origin);
                        if (self.is('a') && self.data('loaded') !== true) {
                            $.get(self.attr('href'), function(data) {
                                instance.content(data);
                                self.data('loaded', true);
                            });
                        }
                    }
                }).on('click', false);
            };
    

    And second question: How i can prevent go to new page if element is a, without .on('click', false) ?

    opened by projct1 18
  • How to remove vertical scroll from tooltip ?

    How to remove vertical scroll from tooltip ?

    Good afternoon friends. I have a lot of data in the tooltip and sometimes (spontaneously) a vertical scroll appears, sometimes it appears, sometimes not. I don't even understand why. Tell me how to remove the vertical scroll from the tooltip?

    Here are my styles: ` .tooltipster-sidetip.tooltipster-noir .tooltipster-box { border: none; background: #161a1e; background: rgba(22,26,30,.9); font-size: 14px; vertical-align: center; text-align: left; overflow: visible; }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-bottom .tooltipster-box { margin-top: 8px }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-left .tooltipster-box { margin-right: 8px }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-right .tooltipster-box { margin-left: 8px }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-top .tooltipster-box { margin-bottom: 8px }

    .tooltipster-sidetip.tooltipster-noir .tooltipster-arrow { height: 8px; margin-left: -8px; width: 16px }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-left .tooltipster-arrow,.tooltipster-sidetip.tooltipster-noir.tooltipster-right .tooltipster-arrow { height: 16px; margin-left: 0; margin-top: -8px; width: 8px }

    .tooltipster-sidetip.tooltipster-noir .tooltipster-arrow-background { display: none }

    .tooltipster-sidetip.tooltipster-noir .tooltipster-arrow-border { border: 8px solid transparent }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-bottom .tooltipster-arrow-border { border-bottom-color: #161a1e; border-bottom-color: rgba(22,26,30,.9) }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-left .tooltipster-arrow-border { border-left-color: #161a1e; border-left-color: rgba(22,26,30,.9) }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-right .tooltipster-arrow-border { border-right-color: #161a1e; border-right-color: rgba(22,26,30,.9) }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-top .tooltipster-arrow-border { border-top-color: #161a1e; border-top-color: rgba(22,26,30,.9) }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-bottom .tooltipster-arrow-uncropped { top: -8px }

    .tooltipster-sidetip.tooltipster-noir.tooltipster-right .tooltipster-arrow-uncropped { left: -8px } Here Java Script Code: $('.myPopover').tooltipster({ contentAsHTML: true, scroll: false, theme: ['tooltipster-noir', 'tooltipster-noir-customized'] }); } ` Here is a screenshot

    opened by Sice55 0
  • Not able to resize the tooltip properly when resizing the browser window

    Not able to resize the tooltip properly when resizing the browser window

    I'm working on a website where the tooltips texts could be quite long. Also one wants to display them starting from the above top left corner of the origin element. I use the following positioning function:

    functionPosition: function (instance, helper, position) {
                        position.coord.top -= 10
                        position.coord.left = helper.geo.origin.offset.left
                        var availableWidth = helper.geo.window.size.width - position.coord.left
                        position.size.width = availableWidth
    
                        return position;
                    }
    

    The availableWidth correction is needed because the width of the tooltip is initially calculated from the tooltipster to fit the viewport and if one moves the tooltip (via position.coord.left = helper.geo.origin.offset.left) and the tooltip's width is big enough, the tooltip will exceed the viewport to the right causing horizontal scroller to appear.

    So in order to avoid the scroller I resize the tooltip, which works correct with the width. The problem is then with the height. It stays unchanged and this causes vertical-scroller within the tooltip to appear.

    How could one avoid that? I tested with maxWidth set initially and it works perfect - the size of the tooltip box is calculated so no scrollers appear (when possible, a.k.a the tooltip text is not too long).

    So with one origin element I could calculate the availableWidth with javascript bevorhand and then give its value to the tooltipster constructor options.

    This solution is not very convenient with more origin elements and it does not work at all when the user changes the viewport size (through resize for example. One could listen for resize and do the recalculation and re-instantiate all of the tooltips , but that would be an overkill)

    The problem is one couldn't change the maxWidth dynamically (as far as I know - I would be glad to be wrong on that :) ). I tried to "hack" it using instance.__options.maxWidth = availableWidth in the functionPosition, but it didn't work.

    Or put it another way - if one changes the width in functionPosition the height won't be resized automatically to fit the content and there is no a function to force that (AFAIK).

    Thanks for any help or other workarounds in advance!

    opened by sunsande 0
  • Can't find the right files

    Can't find the right files

    The names of the stylesheets and javascripts from the downloaded tooltipster-master zip file are tooltipster.main.css and tooltipster.main.min.js. In your instructions you say to move tooltipster.css and jquery.tooltipster.min.js to your root's CSS and JavaScript directories but I can't find files with these names. Also, I don't know which directory to use. The CSS and JavaScript is in 2 different directories, which one is the one that I need?

    C:\xampp\htdocs\physicssimulation\tooltipster-master\tooltipster-master\dist

    C:\xampp\htdocs\physicssimulation\tooltipster-master\dist

    opened by makamo66 0
  • Possible false positive detection as malicious script by BitDefender?!

    Possible false positive detection as malicious script by BitDefender?!

    We have the impression that the version Tooltipster v3.1.0 is incorrectly classified as malware / malicious script by the protection software BitDefender and is blocked at the users with output of a danger warning. Can anyone confirm this?

    opened by macbosse 0
  • Interactive Tooltip with delay 0 not working

    Interactive Tooltip with delay 0 not working

    I can work with interactive with delay (leave delay) equal 0.

    Please visit the tooltip competitor https://codesandbox.io/s/material-demo-forked-smssv?file=/demo.js For me is mandatory to use tooltipster

    I don't want this behaviour either, please show next image: image

    <html lang="en">
      <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Tooltipster interactive not working with delay 0</title>
    
        <link
          rel="stylesheet"
          type="text/css"
          href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/4.0.3/css/tooltipster.bundle.css"
        />
        <script
          type="text/javascript"
          src="https://code.jquery.com/jquery-1.12.4.min.js"
        ></script>
        <script
          type="text/javascript"
          src="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/4.0.3/js/tooltipster.bundle.min.js"
        ></script>
      </head>
      <body>
        <span
          class="demo-interact"
          title="Try clicking &lt;a href='http://google.com/' target='_blank'&gt;this link&lt;/a&gt;"
        >
          Hover
        </span>
    
        <span
          class="demo-interact"
          title="Try clicking &lt;a href='http://google.com/' target='_blank'&gt;this link&lt;/a&gt;"
        >
          Hover
        </span>
    
        <span
          class="demo-interact"
          title="Try clicking &lt;a href='http://google.com/' target='_blank'&gt;this link&lt;/a&gt;"
        >
          Hover
        </span>
    
        <span
          class="demo-interact"
          title="Try clicking &lt;a href='http://google.com/' target='_blank'&gt;this link&lt;/a&gt;"
        >
          Hover
        </span>
    
        <span
          class="demo-interact-50"
          title="Try clicking &lt;a href='http://google.com/' target='_blank'&gt;this link&lt;/a&gt;"
        >
          Hover
        </span>
      </body>
      <script>
        // Interactive not working
    
        $(".demo-interact").tooltipster({
          contentAsHTML: true,
          interactive: true,
          delay: [0, 0],
        });
    
        // Interactive working but I don't want overlay behaviour
        $(".demo-interact-50").tooltipster({
          contentAsHTML: true,
          interactive: true,
          delay: [0, 50],
        });
      </script>
    </html>
    
    opened by pacocom 2
Releases(4.2.8)
Owner
Caleb Jacob
Caleb Jacob
Opentip is an open source javascript tooltip based on the protoype framework.

Opentip Opentip is a free opensource Java-Script tooltip class. Features It supports: Stems (little pointers) Automatic content download with AJAX Dif

Matias Meno 1.3k Dec 6, 2022
A simple CSS tooltip made with Sass

Simptip [v1.0.4] A simple CSS tooltip made with Sass Visit Site, Documentation and some examples Installation Install with npm, Yarn or Bower: npm: np

Arash Manteghi 650 Dec 14, 2022
A CSS only tooltip library for your lovely websites.

Hint.css A tooltip library in CSS for your lovely websites Demo • Get started • Who's using this? • Browser support • FAQs • Contributing • License hi

Kushagra Gour 8.3k Jan 2, 2023
Facebook-style tooltips plugin for jQuery

tipsy Facebook-style tooltip plugin for jQuery (c) 2008-2010 Jason Frame ([email protected]) Released under The MIT License. Description: tip

Jason Frame 2k Oct 15, 2022
A tooltip style toolbar jQuery plugin

Toolbar.js A jQuery plugin that creates tooltip style toolbars. Update Toolbar.js has been overhauled with new functionality, a completely new design

Paul Kinzett 2.3k Dec 18, 2022
A Lightweight Responsive jQuery Tooltip Plugin

tipso A Lightweight Responsive jQuery Tooltip Plugin There is also a Wordpress version of this plugin. Get it here Getting started Include jQuery <scr

Bojan Petkovski 325 Dec 21, 2022
Opentip is an open source javascript tooltip based on the protoype framework.

Opentip Opentip is a free opensource Java-Script tooltip class. Features It supports: Stems (little pointers) Automatic content download with AJAX Dif

Matias Meno 1.3k Dec 6, 2022
A simple CSS tooltip made with Sass

Simptip [v1.0.4] A simple CSS tooltip made with Sass Visit Site, Documentation and some examples Installation Install with npm, Yarn or Bower: npm: np

Arash Manteghi 650 Dec 14, 2022
A CSS only tooltip library for your lovely websites.

Hint.css A tooltip library in CSS for your lovely websites Demo • Get started • Who's using this? • Browser support • FAQs • Contributing • License hi

Kushagra Gour 8.3k Jan 2, 2023
React tooltip is a React.JS Component that brings usefull UX and UI information in selected elements of your website.

React Tooltip ✅ React tooltip is a React.JS Component that brings usefull UX and UI information in elements of your website. Installation ⌨️ React Too

Marc Ramos 1 Dec 22, 2021
Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - Cool tooltips Cool customisable tooltips made from pure CSS Lightweight • Accessible • Customisable • Simple Cooltipz.css is a pure CSS

Jack Domleo 110 Dec 24, 2022
Tippyjs - Tooltip, popover, dropdown, and menu library

Tippy.js The complete tooltip, popover, dropdown, and menu solution for the web Demo and Documentation ➡️ View the latest demo & docs here Migration G

James N 10.5k Dec 28, 2022
A lightweight tooltip plug-in library

popper-next 是一款轻量的 Tooltip 插件 vue、react安装使用 推荐yarn yarn add popper-next 或者 cnpm install popper-next -S 在html页面中如何使用 <script src="https://unpkg.com/pop

east-wzd 4 Dec 7, 2022
Data-tip.css - Wow, such tooltip, with pure css!

Notice: hint.css has been much better since I complained about it months ago, so try out its new features instead of this one! data-tip.css Wow, such

EGOIST 117 May 26, 2021
A basic Svelte tooltip directive.

SVooltip A basic Svelte tooltip directive. Powered by Floating UI. Usage <script> import { tooltip } from 'svooltip'; import 'svooltip/svooltip.css'

Ian 28 Nov 26, 2022
A simple step by step tooltip helper for any site

Tooltip Sequence A minimalistic set of tooltips on your app. What it does So suppose you create a Web Application and you want to take your users or a

Sooraj Sivadasan Nair 299 Dec 21, 2022
Tooltip using only CSS and very low build size.

css-only-tooltip A very lightweight tooltip utitlity library, made using only CSS with dynamic light and dark themes. Insatallation Using npm $ npm in

Rajiv 4 Dec 11, 2022
Simple pure CSS ToolTip

PureCSSToolTip Simple pure CSS ToolTip purecsstooltip.css is used to the added tooltip for a web app, web page without javascript. This full of CSS co

Gokul S 3 Sep 19, 2022
The JavaScript library let’s you transform native tooltip’s into customizable overlays.

iTooltip The JavaScript library let’s you transform native tooltip’s into customizable overlays. Use: <script src="/path/to/iTooltip.js"></script> <sc

null 2 Dec 17, 2021
JQuery-TableToExcel - Light weight jQuery plugin for export HTML table to excel file

tableToExcel Light weight jQuery plugin for export table to excel file Demos Website and demo here: http://tanvirpro.com/all_project/jQueryTableToExce

Tanvir Sarker 4 May 8, 2022