SiemensSEN
asked on
insert a tr tag using jquery
Hello.
How do I add a TR tag in a particular section..
e.g
<table id="tbl1">
<tr id="ca">
</tr>
<tr id ="sa">
</tr>
</table>
I would to add a tr tag after TR with ID = ca and before id = sa
<table id="tbl1">
<tr id="ca">
</tr>
<tr id="XX">
</tr>
<tr id ="sa">
</tr>
</table>
How do I add a TR tag in a particular section..
e.g
<table id="tbl1">
<tr id="ca">
</tr>
<tr id ="sa">
</tr>
</table>
I would to add a tr tag after TR with ID = ca and before id = sa
<table id="tbl1">
<tr id="ca">
</tr>
<tr id="XX">
</tr>
<tr id ="sa">
</tr>
</table>
ASKER
Sorry..
Here is my TR string to insert
How do I insert it after the row with ID='ca'
Here is my TR string to insert
str += "<tr>";
str +="<td class='tableCell_5percent'> </td>";
str +="<td class='tableCell_25percent'> </td>";
str +="<td class='tableCell_5percent'> </td>";
str +="<td class='tableCell_65percent labels'>"+psets[ps].Name+"</td>";
str +="</tr>"
How do I insert it after the row with ID='ca'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Test page : http://jsfiddle.net/unQbh/