Craga89/qTip2 — Issue #301: Wrong position when "ready: true"
Author: Alcotana
Created: 2012-01-25 08:52:30+00:00
State: open

Hello!

I have my own 'click' event on my div which creates a qtip:

if(!$(this).qtip('api')) {
$(this).qtip({
content: {
text: event.tip,
title: {
text: event.title,
button: 'Close'
}
},
show: {
event: 'click',
delay: 0,
solo: true,
ready: true,
effect: function(offset) {
$(this).slideDown(100);
}
},
hide: {
event: false
},
position: {
my: 'bottom center',
at: 'top center',
target: $(this),
viewport: $(window),
},
style: {
classes: 'ui-tooltip-light ui-tooltip-shadow ui-tooltip-rounded',
width: 335,
hight: 250,
widget: true,
tip: {
border:1
}
}
});
}

The tooltip has a wrong position after clicking (-7px down in my case). This position becomes correct when I scroll window (only if "viewport: $(window)"), or when "ready: false" (which is undesirable in my case). I think that the right position is not calculated when "ready: true". Please test it and fix!