You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

show tooltip on click Created Jun 16, 2009

This thread is solved

Views: 3572     Replies: 4     Last reply Aug 30, 2010  
You must login first before you can use this feature

turco

Posts: 1

Registered:
Jun 16, 2009

show tooltip on click

Posted: Jun 16, 2009

Hi, is it possible to show tooltip on click rather than on rollover?

skky1142

Posts: 1

Registered:
Aug 3, 2009

I would also like to know the answer to this question...

Posted: Aug 3, 2009

Reply to: show tooltip on click, from turco
I would also like to know the answer to this question... Is it possible to show tooltip on click rather than on rollover?

PrivateDetective

Posts: 1

Registered:
Aug 4, 2009

» show tooltip on click

Posted: Aug 4, 2009

Reply to: show tooltip on click, from turco
I've made it using API & callback functions:


<script type="text/javascript">
<!--

var allowed = false;

$(function() {
    $("#trigger").tooltip({ 
 
        position: ['bottom', 'center'], 
        effect: 'fade' 
    });

    var api = $("#trigger").tooltip(0);
    
    api.onBeforeShow(function(){ return allowed; });
    api.onBeforeHide(function(){ return allowed; });
    api.onShow(function() { allowed = false; });
    api.onHide(function() { allowed = false; });
    
    window.toggleTooltip = function() {
        
        allowed = true;
        
        if (api.isShown())
        {
            api.hide();    
        }
        else
        {
            api.show();    
        }
    }

});

    
//-->
</script>

archangel519

Posts: 2

Registered:
May 7, 2010

Use the "events" property and api.isShown()

Posted: Aug 10, 2010

Reply to: show tooltip on click, from turco

var tooltip = $('.trigger').tooltip({
   effect: 'fade',
   predelay: 250,
   delay: 100,
   position: 'center right',
   relative: true,  
   events: { def: 'click, blur' },
   api: true
});

$('.trigger').click(function() {
   if (tooltip.isShown()) {
      tooltip.hide();
      return false;
   }
});

insidion

Posts: 2

Registered:
Aug 30, 2010

alternating between click and mouseover (pin tool tip)

Posted: Aug 30, 2010

Reply to: Use the "events" property and api.isShown(), from archangel519
is it possible to assign this behavior after an event? eg. onclick, pin tool tip open until click again, otherwise mouseover?