LordZardeck
LordZardeck

Reputation: 8283

disable jQuery qTip mouse events

How can I keep qTip from automatically showing and hiding the tooltips on mouseenter mouseleave events?

Upvotes: 1

Views: 2670

Answers (3)

Federico
Federico

Reputation: 5778

This is what I have and works. It disables mouse events and tool tips is trigger by qtip("show")

$(document).ready(function() {
  $('#link1').qtip({
    content: 'This is a tool tip',
    show: {
      event: false
    },
    hide: {
      event:false
    }
  })

  $('#link1').qtip("show");
});

Upvotes: 1

amurra
amurra

Reputation: 15401

You can specify the events that will cause the tooltip to hide in the hide option:

$('#tooltip').qtip({     
   hide: {
      when: 'mouseenter mouseleave'
   }
});

or you can try setting the when attribute in the show option to false:

$('#tooltip').qtip({     
   show: {
          ready: false, /* Don't show the tooltip once its ready */
          when: false /*  Prevents the tooltip from showing for any event */  
   }
});

Upvotes: 1

Plebsori
Plebsori

Reputation: 1085

As per the docs, you can register for the "beforeShow" event and returning false will stop the tooltip from showing.

So something along the lines of this

$("your jquery selector").qtip({ api: { beforeShow: function(event) { return false; } } });

Upvotes: 1

Related Questions