[jQuery] [tooltip] plugin

[jQuery] [tooltip] plugin


I have used this successfully for elments that were defined in the
initial page (hardcoded into the html). But now that I have a couple
I .append() dynamically, I cannot get the text to popup. It seems as
if the .tooltip() doesn't work if the element is added after the page
loads.
Note that I perform $("#tooltipID").tooltip() after the $
("#container).append() is done. I would expect that as long as the
element I want to bind the tooltip to exists, it should attach itself
to that element.
I even tried a setTimeout to defer the .toolip() execution slightly,
just in case. No better. I am careful to ensure there are no
duplicate IDs.
I found that I could (with Firebug) perform a .toggle() on the
selector, and it would hide/show properly. So clearly the element is
there and 'known' to scripts because other actions work. Only
the .tooltip() seems to not 'see' the dynamically-added elements.
Briefly, my effort is thus:
                if ($("label.selection-status~a").length==0) { // No '<a>'
siblings yet, add them
                     $("label.selection-status").after(" <a id='unselectall'
class='status' href='#' caption='caption' info='info'>text1</a> <a
id='showall'class='status' href='#' caption='showall'
info='info'>text2</a>");
                     $("a#unselectall").tooltip();
                     $("a#showall").tooltip();
                     $("a#unselectall").click(
                             function() {
                                 SetCookie(cookieFavorites,'');
                                 evalFavorites();
                                 clearAll();
                                 return false;
                             }
                     );
                     $("a#showall").click(
                             function() {
                                 $(this).attr('href',$(this).attr('href').toString().split
('#')[0].split('&')[0].split('?')[0] + '?' + getIdlist()+"&ns=1");
                             }
                     );
                }