unable to get tooltip to work when usingjQuery load() content

Posted by user281867 on Stack Overflow See other posts from Stack Overflow or by user281867
Published on 2010-03-30T00:19:42Z Indexed on 2010/03/30 0:23 UTC
Read the original article Hit count: 690

Filed under:
|

Hi,

I am having problem getting my tooltip to work when using the jQuery load() function. The tooltip works fine if i don't use load() to load external dynamic data.

I googled and found the i may need to use live(), but I can't figure how to get it to work. Any suggestion?

thank you!!

Here is my scripts:

function loadEMERContent(uid) { $("#ActionEWPNBook").load("ajaxLoadDATA.cfm?uid="+uid, null, showLoading); $("#EWPNBookloading").html(''); }

function showLoading() { $("#EWPNBookloading").html('');

}

function simple_tooltip(target_items, name){ $(target_items).each(function(i){ $("body").append(""+$(this).attr('title')+"

"); var my_tooltip = $("#"+name+i);

    $(this).removeAttr("title").mouseover(function(){
            my_tooltip.css({opacity:0.8, display:"none"}).stop().fadeIn(400);
    }).mousemove(function(kmouse){
            my_tooltip.css({left:kmouse.pageX+15, top:kmouse.pageY+15});
    }).mouseout(function(){
            my_tooltip.stop().fadeOut(400);               
    });
});

}

Here is my ajaxLoadDATA.cfm:

Date Hours Modify Date #dateformat(vdate, "mm/dd/yyyy")##dateformat(vdate, "mm/dd/yyyy")# #hours# #dateformat(posted, "mm/dd/yyyy")#  ACTIONS:    Add    Edit    Cancel

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript