fix tipsy not updating on reinitialization

This commit is contained in:
Hendrik Leppelsack 2015-07-08 10:53:17 +02:00
parent 00b97dfbb1
commit 6f547a9960
1 changed files with 5 additions and 2 deletions

View File

@ -1757,7 +1757,6 @@ jQuery.fn.tipsy = function(argument) {
trigger: 'hover',
html: false
};
// tooltip direction
if(argument.gravity) {
switch(argument.gravity) {
case 'n':
@ -1793,7 +1792,11 @@ jQuery.fn.tipsy = function(argument) {
if(argument.title) {
options.title = argument.title;
}
// destroy old tooltip in case the title has changed
jQuery.fn.tooltip.call(this, 'destroy');
jQuery.fn.tooltip.call(this, options);
} else {
this.tooltip(argument);
jQuery.fn.tooltip.call(this, argument);
}
jQuery.fn.tooltip.call(this, argument);
}