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