Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to eliminate the jQuery tooltip fade effect

I am using jquery ui tooltip function and I feel like the fade in tooltip is a little annoying.

I had added delay : 0 but its still does the fading.

Does anyone have a solution to this or can recommend another tooltip functionality? Thanks!

Below is my code

$(function () {
    $(document).tooltip({
        show: {
            effect:'toggle',
            delay:0

        },
        content: function () {
            return $(this).prop("title");
        }
    });
like image 769
json2021 Avatar asked Jun 23 '15 14:06

json2021


2 Answers

Use:

show: false

This disables the effect on show event. Same goes for hide.

Demo

Source: http://api.jqueryui.com/tooltip/#option-show

like image 189
EmirCalabuch Avatar answered Oct 27 '22 17:10

EmirCalabuch


If you can't use show:false because you need to set other show properties, for example, you really do want a delay before the tooltip displays, but just want the tooltip to appear after the delay with no animation effect, you can use effect: "none" as shown below:

show: {
    delay: 500,
    effect: "none"
}
like image 2
nrb Avatar answered Oct 27 '22 16:10

nrb