Well, I've just tried and next line works:

$("#oneId div[id='anotherId']").append(HTML);

On 2 mar, 21:56, MorningZ <morni...@gmail.com> wrote:
> 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 <garcia.narb...@gmail.com> wrote:
>
> > I am trying to do:
>
> > $("#oneId > #anotherId").append(HTML);
>
> > but it doesn't work. On the other hand, next line works:
>
> > $("#oneId > #anotherId").remove();
>
> > What works for the first case is:
>
> > $("#oneId  div[id='anotherId']").each(function(){
> >         $(this).append(HTML);
>
> > });
>
> > I don't understand why "$("#oneId > #anotherId").append(HTML);"
> > doesn't work.
>
> > Thanks in advance.

Reply via email to