I am using the jQuery tooltip plugin. I have a template with a few HTML controls, which I load when I click on a button (after page load). When I bind the template with data, I call the BindTooltip
method that binds the tooltips to the above set of controls.
$("#btnAddCity").tooltip({
bodyHandler: function() {
return 'Add city here';
},
delay: 100
});
The problem comes when I try to empty data in my template and rebind it with different data. I am getting the JavaScript error:
fade is null or not an object
Below is the code from tooltip.js
and settings(current)
is undefined when I try to empty and rebind my template data. Am I missing anything here?
// Delete timeout and show helper
function show() {
tID = null;
if ((!IE || !$.fn.bgiframe) && settings(current).fade) {
if (helper.parent.is(":animated"))
helper.parent.stop().show().fadeTo(settings(current).fade, current.tOpacity);
else
helper.parent.is(':visible') ? helper.parent.fadeTo(settings(current).fade, current.tOpacity) : helper.parent.fadeIn(settings(current).fade);
} else {
helper.parent.show();
}
update();
}