Reputation: 4025
I have following Code in HTML
<div class="newloop_11"></div>
<div class="newloop_12"></div>
<div class="newloop_13"></div>
<div class="newloop_14"></div>
<div class="newloop_15"></div>
<div class="newloop_16"></div>
And When i call a ajax request on any event
i got following HTML
<div class="replacewith_11 textme loop" id="test_1">
//lotsof content
</div>
<div class="replacewith_12 textme loop" id="test_2">
//lotsof content
</div>
<div class="replacewith_13 textme loop" id="test_3">
//lotsof content
</div>
Now I want to wrap ajax html with previous HTML
if their value is matched
Expectd out like this
<div class="replacewith_11 textme loop" id="test_1">
//lotsof content
</div>
<div class="replacewith_12 textme loop" id="test_2">
//lotsof content
</div>
<div class="replacewith_13 textme loop" id="test_3">
//lotsof content
</div>
<div class="newloop_14"></div>
<div class="newloop_15"></div>
<div class="newloop_16"></div>
How to do this in Jquery.
I tried InnerHTML, append, html method, but i have no idea how to do this
Any Help will be apprecaited
Thanks
Upvotes: 2
Views: 82