[jQuery] "After the fact" tooltip application problem
I have a page where I'm using tooltip that is dynamically constructed
with $AJAX calls. The static content gets tooltip initialization just
fine, but I'm having trouble with content added after initial load.
The first call to tooltip after page load:
function setFactoryTooltip()
{
$('.factory,').tooltip({
track:
true,
delay:
0,
showURL:
false,
opacity:
1,
showBody: " -
",
extraClass: "pretty
fancy",
fixPNG:
true,
top:
-15,
left:
5
});
}
This works great.
After an AJAX call that populates another area on the screen, I call:
function setSingleTooltip(element) {
$(element).tooltip({
track: true,
delay: 0,
showURL: false,
opacity: 1,
showBody: " - ",
extraClass: "list",
fixPNG: true,
top: -15,
left: 5
});
}
where 'element' is the class of a newly added <div>.
I haven't been able to figure out where I can put the "SingleTooltip"
call such that it is done automatically after the new divs are added.
Nothing I've tried works. However, if I put that function call on a
button or menu and physically call it manually, it works. Throughout
all this, the original tooltips work great!
Any ideas?
Thanks,
T.