[jQuery] Re: Cloning a table row that is not in a table

2010-01-13 Thread RhythmicDevil
Yes. Now I understand. Thank you.

On Jan 13, 1:02 pm, Nathan Klatt  wrote:
> On Wed, Jan 13, 2010 at 11:58 AM, RhythmicDevil 
> wrote:
>
> > If its not in the DOM why do I see it in the source? I am having a
> > disconnect here. I have fixed it as I said above. But I am curious I
> > thought the DOM represented the HTML that is present at load time.
>
> Maybe I misunderstand what you mean by "in the source" - do you mean when
> you do a View | Source it's there? Because that is merely the text sent by
> the server to the browser. It's what the browser uses to generate the DOM,
> it is not the DOM itself. Know what I mean?
>
> Nathan


Re: [jQuery] Re: Cloning a table row that is not in a table

2010-01-13 Thread Nathan Klatt
On Wed, Jan 13, 2010 at 11:58 AM, RhythmicDevil wrote:

> If its not in the DOM why do I see it in the source? I am having a
> disconnect here. I have fixed it as I said above. But I am curious I
> thought the DOM represented the HTML that is present at load time.
>

Maybe I misunderstand what you mean by "in the source" - do you mean when
you do a View | Source it's there? Because that is merely the text sent by
the server to the browser. It's what the browser uses to generate the DOM,
it is not the DOM itself. Know what I mean?

Nathan


[jQuery] Re: Cloning a table row that is not in a table

2010-01-13 Thread RhythmicDevil
If its not in the DOM why do I see it in the source? I am having a
disconnect here. I have fixed it as I said above. But I am curious I
thought the DOM represented the HTML that is present at load time.



On Jan 13, 12:54 pm, Nathan Klatt  wrote:
> On Wed, Jan 13, 2010 at 11:36 AM, RhythmicDevil  
> wrote:
> > I did not think the selectors would enforce that.
>
> It's not the selectors; the problem is the tr never makes it into the
> DOM because the invalid html gets ignored by the browser. Because the
> tr isn't in the DOM, the selector has no chance of finding it. :)
>
> Nathan


Re: [jQuery] Re: Cloning a table row that is not in a table

2010-01-13 Thread Nathan Klatt
On Wed, Jan 13, 2010 at 11:36 AM, RhythmicDevil  wrote:
> I did not think the selectors would enforce that.

It's not the selectors; the problem is the tr never makes it into the
DOM because the invalid html gets ignored by the browser. Because the
tr isn't in the DOM, the selector has no chance of finding it. :)

Nathan


[jQuery] Re: Cloning a table row that is not in a table

2010-01-13 Thread RhythmicDevil
You are correct about that. But I did not think the selectors would
enforce that. My solution is just to put another table with the row
and hide that. Which makes it valid.



On Jan 13, 12:03 pm, Nathan Klatt  wrote:
> On Wed, Jan 13, 2010 at 9:15 AM, RhythmicDevil  
> wrote:
> > So it seems I can only select a row if its in a table? That makes no
> > sense?
>
> Makes perfect sense; a table row cannot exist outside of a table.
>
> Nathan