After getting a good nights sleep, and doing more research, it seems
the problem is not scope-related, but ajax-related. The advice I have
read suggests setting return values from within the ajax callback
function, because of the asynchronous completion of the ajax function.
So, I have attempted to apply the tooltip functions within the ajax
callback, but without success. The ajax is returning it's values, but
the tooltip is not being applied. Any advice welcome. Thanks!


$('a[href^=logmar]').queue(function(){
        var args = $(this).attr("href").split('?')[1];
        if(args.charAt(0) == "l")
        {
                var lm = args.substring(2, args.length);
                $.get("templates/templates.php", {'action': 'lm2sn', 'l' : lm },
                function(response){
                        if(response.length > 0)
                        {
                                $(this).tooltip({
                                        bodyHandler: function() {
                                                return response;
                                        },
                                        showURL: false
                                });
                        }
                });
        }
});

Reply via email to