Surya Surya - 2 years ago 162
AngularJS Question

Show/Hide tooltip on button click

How to stop/block tooltip from hiding on

in angular-tooltips?

I need to show and hide the tooltip on button click instead.

Answer Source
   app.directive('tooltip', function(){
        return {
            restrict: 'A',
            link: function(scope, element, attrs){
                $(element).hover(function(){ // or you can use click instaed of hover
                    // on mouseenter
                }, function(){
                    // on mouseleave
                    $(element).tooltip('show'); //or you can remove this one
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download