it’s dynamic code and i have design issue with that
<td id="test" class="test1"></td>
<div id="WidgetButton" class="right">test</div> // that part of code making dyamic
there is any way put that <div> has id WidgetButton and inside <td></td>
like that
<td id="test" class="test1">
<div id="WidgetButton" class="right">test</div>
</td>
plz suggest me how can i do it with jquery
thanks
As both of them have
ids, this is a trivial application of thejQueryfunction (usually aliased as$) andappendTo.It’s just as well they both have
ids, too, because otherwise it would be tricky, since the markup is invalid and so browsers will relocate thedivto where they guess it should go, so using structural selectors and relative traversal would be difficult. Theidvalues trump that, thankfully.