Hi, is it possible to show tooltip on click rather than on rollover?
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
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?
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>
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;
}
});
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?
