Hi all, First time using jquery and so far I love it. But I am having a bit of an issue and I was hoping someone could point me in right direction. I am using the tablesorter plugin for jquery and it works fine. But my issue is I am loading the data using ajax, and I cant seem to get my <tr> to trigger jquery. if I fill out the data by hand in html it works fine but when I load it with ajax nothing happens. I mean I can see the data and the tablesorter works. Attach is my javascript, hopefully someone can help.
$(document).ready(function(){ $("#usedcars").tablesorter(); $.getJSON("jsondata.php", function(data){ $.each(data.usedcars, function(i, user){ var tblRow = "<tr>" +"<td>"+user.stocknumber+"</td>" +"<td>"+user.make+"</td>" +"<td>"+user.age+"</td>" +"<td>"+user.year+"</td>" +"<td>"+user.model+"</td>" +"<td>"+user.engine+"</td>" +"<td>"+user.trans+"</td>" +"<td>"+user.color+"</td>" +"<td>"+user.miles+"</td>" +"<td>"+user.drive+"</td>" +"<td>"+user.cost+"</td>" +"<td>"+user.book+"</td>" +"<td>"+user.retail+"</td>" +"<td>"+user.backofbook+"</td>" +"<td>"+user.location+"</td>" +"</tr>" $(tblRow).appendTo("#usedcars tbody"); }); $("#usedcars").trigger("update"); var sorting = [[0,0]]; $("#usedcars").trigger("sorton",[sorting]); $('tr').addClass('carDetails'); }); $(".carDetails").click(function(){ $(this).hide(); }); }); -- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.