i am sorry - but i have been looking at this code for a while and i cant
figure what exactly it is doing (sorry i'm a noob). could you possibly
break it down and explain whats going on in each step?
Chris Domigan wrote:
>
> .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/
>
>
--
View this message in context:
http://www.nabble.com/onclick---toggle-the-creation-of-a-TR--tf3230589.html#a8995198
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/