I would like to append HTML into a div of a particular ID there .How do i select it ?
<div id="1">
<div class="c"></div>
<div class="c"></div>
<div class="c"></div>
</div>
<div id="2">
<div class="c"></div>
<div class="c"> TO APPEND INSIDE THIS DIV </div>
<div class="c"></div>
</div>
<div id="3">
<div class="c"></div>
<div class="c"></div>
<div class="c"></div>
</div>
i was using
$(data).appendTo("#"+id).find(".c");
but its giving me problem as the appending is not going inside the div but outside the div
you can try,
or
You can try:
For more specificity may use index of any specific
div.c;UPDATE: for
appendTo()just wrapped the target selector with$()and it works for me.NOTE DON’T USE ONLY NUMERIC ID. IT ID PROHIBITED. FOR MORE READ