Insert html from ajax call in multiple sections

KMR

New Member
I make an ajax call to a function which returns html.\[code\]$.ajax({ url: url, type:'POST', dataType: 'html', success: function(output){ $("#prikaz_oglasov").html(output); } ,error: function (xhr, status) { alert('error: ' + status); } }); \[/code\]I insert the html in a div with a specific id. Now when a onclick event occurs I would like to receive two chunks of html code and insert it in two different divs. I could ofcourse do two ajax calls, but it doesnt seem very efficient. Is there any way to do this?
 
Back
Top