Reputation: 137
In a html page when data comes through an ajax call its in this format.
<input type="hidden" id="s1" name="1" value="111" />
<input type="hidden" id="s2" name="2" value="222" />
and its loads in <div="ajax"> Ajax data </div>
but i have to show data in another div
like this using jquery or javascript:
<div id="j1"> 111 </div>
<div id="j2"> 222 </div>
So i need a jquery or javascript code to handle the situation.
Upvotes: 1
Views: 2353
Reputation: 3867
In Callback write this:
$('#j1').html($('#s1').val());
$('#j2').html($('#s2').val());
Upvotes: 1