[jQuery] Re: append() strange behaviour

2009-03-02 Thread James
I apologize if I didn't understand what you just said. You cannot have more than one element on the same page with the same ID. But they can have the same class. On Mar 2, 11:03 am, David wrote: > The point is that I am doing something is not suitable at all. > I've got, for example, #div_1 and

[jQuery] Re: append() strange behaviour

2009-03-02 Thread David
Well, I've just tried and next line works: $("#oneId div[id='anotherId']").append(HTML); On 2 mar, 21:56, MorningZ wrote: > Does > > $("#anotherId").append(HTML); > > work? > > What about > > document.getElementById("anotherId").innerHTML = HTML; > > ?? > > Are *you sure* that variable "HTML" i

[jQuery] Re: append() strange behaviour

2009-03-02 Thread David
The point is that I am doing something is not suitable at all. I've got, for example, #div_1 and #div_2, and on child of each div has the same id. That's why I am trying to access it this way On 2 mar, 21:56, MorningZ wrote: > Does > > $("#anotherId").append(HTML); > > work? > > What about > > d

[jQuery] Re: append() strange behaviour

2009-03-02 Thread MorningZ
Does $("#anotherId").append(HTML); work? What about document.getElementById("anotherId").innerHTML = HTML; ?? Are *you sure* that variable "HTML" is a valid string? On Mar 2, 3:44 pm, David wrote: > I am trying to do: > > $("#oneId > #anotherId").append(HTML); > > but it doesn't work.