I can manually set the X and Y offset of a tooltip using the qTip API with numerical values, like this:
$(this).qtip('api').set({
'position.adjust.x': 89,
'position.adjust.y': 77
});
But I can't do it programmatically, like this:
var offsetX = $(this).attr('data-tooltip-offsetX');
var offsetY = $(this).attr('data-tooltip-offsetY');
$(this).qtip('api').set({
'position.adjust.x': offsetX,
'position.adjust.y': offsetY
});
When I try that, the tooltips simply don't appear.
Any thoughts or tips would be appreciated. Thanks!
Edit: Is it possible offset[ X | Y ] is being interpreted as a string instead of a number?
You need to parse the string to an int like so:
See fiddle