.next() only gets siblings, so you won't be able to select the new <td> as
it's nested one deeper than the <tr> you're searching from.

I have similar functionality in a program of mine, here is how I did it:

$("#table_Orders tbody tr").bind("click", function() {
   $("#expanded").remove();
   if ($(this).is(".selected")) {
     var row = this;
     var data = ajaxData(ORDERS, "expandLine", [getSelected(this)]);
     $.get(RPC, data, function(html) {
       if ($(row).is(".selected")) { // Makes sure row is still selected
after AJAX request completes
         $(row).after("<tr><td id='expanded'
colspan='"+row.cells.length+"'>"+html+"</td></tr>");
       }
     });
   }
 });

Ignore all the ".selected" stuff...

Chris
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to