Response title
This is preview!
<div class="main_container"> <div class="my_div1"> //div_to_render_JSON_1 </div> <div class="my_div2"> //div_to_render_JSON_2 </div> <div class="my_div3"> //div_to_render_JSON_3 </div> <button class="trigger_ajax_function_btn">Click to load ajax</button> //this btn loads ajax into the div class "my_div" </div> <div class="main_container"> <div class="my_div1"> //div_to_render_JSON_1 </div> <div class="my_div2"> //div_to_render_JSON_2 </div> <div class="my_div3"> //div_to_render_JSON_3 </div> <button class="trigger_ajax_function_btn">Click to load ajax</button> //this btn loads ajax into the div class "my_div" </div>
And here is how my jquery looks like:function my_ajax_function(){ $.ajax({ dataType: "JSON", type: 'POST', url: test.php, success: function(data) { $('.my_div1').html(data.PHP_JSON_1_RECEIVED); $('.
my_div2
').html(data.PHP_JSON_2_RECEIVED); $('.
my_div
3').html(data.PHP_JSON_3_RECEIVED); } }); }
JΛ̊KE
© 2013 jQuery Foundation
Sponsored by and others.