calebjacob / tooltipster

A jQuery tooltip plugin
MIT License
2.76k stars 480 forks source link

start 2 instances of tooltipster at a time #764

Closed dlepold closed 5 years ago

dlepold commented 5 years ago

I tried, failed and wondered if it wasn't possible to start two classes of tooltips one one page:

one with normal .tooltip class, the other with .tooltip2 class for example.

This is because i want two different behaviours on the website: one kind of tooltip whcih starts with mouseenter, the other with keyup on a field. But since the behaviours have been defined when:

        $('.tooltip_notOnMouseEnter').tooltipster({
            theme: 'tooltipster-punk' 
            , animation : 'fade'
            , contentAsHTML: true 
            , zIndex: 5000
            , maxWidth: 420
            , trigger: 'custom', 
                    triggerOpen: {
                        mouseenter: FALSE,
                        touchstart: true,
                        originClick: true ...

and the original one:

$('.tooltip').tooltipster({ theme: 'tooltipster-punk' , animation : 'fade' , contentAsHTML: true , zIndex: 5000 , maxWidth: 420 , trigger: 'custom', triggerOpen: { mouseenter: true, touchstart: true, originClick: true ....

I have a feeling i lack some basic concepts here.... maybe

louisameline commented 5 years ago

Hi, it's absolutely possible and should work. You should provide more code and submit your question on Stackoverflow as this support here is for bugs only. Thanks