Hello

I have one anchor link per row in my table's td's with a css class of
.viewLink, and have attached a simple event to display a div with the
contents from an ajax request. Now i am trying to align the popup with the
position of the link, or row at least.

Here is the code i have so far.

$(document).ready(function(){
                $("#viewDetailsTable .viewLink").each(function(){
                        $(this).mouseover(function(){
                                $.ajax({
                                        type:           "GET",
                                        url:            this.href,
                                        data:           "format=html",
                                        success:        function(response){
                                                                        //var 
td = $(this).parent().position();
                                                                        
//alert(td.top);
                                                                        
                                                                        
$("#popUp").empty();
                                                                        
$("#popUp").append(response);
                                                                        
$("#popUp").fadeIn("slow");
                                                                }
                                });
                        
                        $(this).mouseout(function(){
                                $("#popUp").fadeOut("slow");
                        });
                        
                                return false;                   
                        })
                });
        }); 

I have tried:
var td = $(this).parent().position();                                           
                        
alert(td.top);

(as commented out above)
..but it doesn't work. How can i get the position of the link in the table
(in pixels, so i can set the style of the pop-up).
-- 
View this message in context: 
http://old.nabble.com/Getting-position-of-link-parent-in-table-tp26163601s27240p26163601.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to