I'm using the tipsy plugin for jQuery. Whenever I try to call tipsy with both a manual trigger and delayIn, the delayIn doesn't seem to work:
$('.interest').tipsy({trigger:'manual', gravity: 'n', html: true, delayIn: 3000});
An开发者_如何学Cy ideas as to why?
The short answer is that once you turn on trigger:'manual'
, tipsy doesn't take care of delayIn any more. Your best bet might be to just have your manual trigger (wherever you do ...tipsy('show')
) do a delay instead:
setTimeout("\$('#link').tipsy('show');",3000);
You could also look at the tipsy source to see that they have a slightly more elegant version that you could work from:
function enter() {
var tipsy = get(this);
tipsy.hoverState = 'in';
if (options.delayIn == 0) {
tipsy.show();
} else {
setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
}
}
精彩评论