Question on .live() and ajax calls
Hi everybody!
Developing my site i ran up against this problem:
I generate a <table> (with 20 rows) element with a server side php script, i load it into a jquery-ui tab element, then i generate a list of link (to page the table if the sql query returned more than 20 elements) and add it after the table, then i try to hijax the link row using live() in this way:
$("#alphaDiv > div > a").live("click", function(){
var url = $(this).attr("href");
$("alphaDiv > div').fadeOut().slideUp("slow",function(){
$(this).load(url, function(){
$(this).slideDown().fadeIn();
})
});
});
return false;
});
it works BUT it make one ajax call for EVERY link in the row so .... what do i have to change to make it submit only one call ?
Thank you for your time!