how to add animation on bootstrap Tooltip?

前端 未结 2 1344
误落风尘
误落风尘 2021-02-10 23:21

Is there any way to add slide down animation on bootstrap tooltip, when hover.

\"facebook\"

2条回答
  •  礼貌的吻别
    2021-02-11 00:23

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

    -- You need to care about bootstarp documentation from here that Apply a CSS fade transition to the tooltip not a class like animated slideInDown. By the way it's an boolean type.

    animate.css is suggesting you to add classes for the elements, you want animated.

    So you need to add some extra jquery like :

        $('[data-toggle="tooltip"]').hover(function (){
              $(this).next().addClass("animated shake");               
        });
    

提交回复
热议问题