Cannot add new tooltips using different ajax library and reinitiate the tooltips
Posted: Nov 3, 2009
Hi,
I am adding tooltips to my site using the follwing code:
This works great on my first load and all the tooltips that have this class to itself is enabled. However, when I add the new tooltips to the DOM and I call the method again using using Ajax the new DOM elements / tooltips is not working.
Any suggestions to how I can reinitiate all the tooltips again?
NB: It works when i press F5 in the browser as it seems to run the tooltip scripts all over again, but not on ajax calls adding new elements to DOM.
I am adding tooltips to my site using the follwing code:
$("div.hjelpNavKnapp > a").tooltip({
tip: "div.tooltip",
position: "bottom right",
offset: [-19, 13],
relative: true,
effect: 'slide'
}
);
This works great on my first load and all the tooltips that have this class to itself is enabled. However, when I add the new tooltips to the DOM and I call the method again using using Ajax the new DOM elements / tooltips is not working.
Any suggestions to how I can reinitiate all the tooltips again?
NB: It works when i press F5 in the browser as it seems to run the tooltip scripts all over again, but not on ajax calls adding new elements to DOM.