Thanks Karl
You know, I tried a simple clone() and nothing happens in IE - no
error, but no new row either.
My current workaround (that works) is this:

                        var rowcontents = $('#contractDetails tbody 
tr:last').html();
                        var row = ("<tr>" + rowcontents + "</tr>");
                        $(row).appendTo('#contractDetails tbody');

not as pretty, but it works well enough for my mockup



On May 15, 12:26 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Rolf,
>
> If you're already using livequery, do you even need to use  
> clone(true)? Wouldn't simple clone() do the trick? I thought that the  
> true arg was for cloning the events along with the elements, but  
> that's what livequery does for you. Maybe I'm misunderstanding, though.
>
> --Karl
> _________________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On May 15, 2008, at 3:04 PM, rolfsf wrote:
>
>
>
> > I need to clone a table row, and have run into the IE6 clone(true) bug
> > using jQuery 1.2.2.
> > I can't upgrade to jQuery 1.2.3 just yet, so I'm wondering what the
> > simplest workaround is?
>
> > I simply want to duplicate the last row of a table. I was using the
> > following:
>
> > $('#addRow')
> >                    .livequery('click', function(event) {
>
> >                            var row = $('#contractDetails tbody tr:last');
> >                    $(row).clone(true).insertAfter(row).toggleClass('alt');
> >                    });
>
> > works great in FF, etc. Throws an error in IE6
>
> > Thanks,
> > rolf

Reply via email to