Using Jquery to insert a row in parent window table

If we have a table in parent widow:

<table id="demo_table">
  <tbody>
  <tr>
    <td>1</td>
    <td>a</td>
  </tr>
  </tbody>
</table>

Now, we want use jquery to insert a row to this table from a frame.
We can write jquery:

parent.$('#demo_table').last().append('<tr><td>2</td><td>b</td></tr>');

or this way

parent.$('#demo_table > tbody').append('<tr><td>3</td><td>c</td></tr>''); 
affiliate_link
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

One Response to “Using Jquery to insert a row in parent window table”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>