Reputation: 87
I use
$('#new-nav1').load("/yiite/index.php/includes/load_second #table",{
ID:ID,name:name,ord:ord
});
I want to put it under loaded data, there will be a lot of data, that`s why load it into another div is not the solution Every time it replaces elements in idv #new-nav1.
Upvotes: 0
Views: 737
Reputation: 2511
You can append after the data is loaded using a temporary div.
$("<div/>").load("/yiite/index.php/includes/load_second #table", {
ID: ID, name: name, ord: ord
}, function () {
$(this).appendTo("#loaded-data").unwrap();//unwrap removes the temp div
});
Upvotes: 1
Reputation: 11741
You can give a try to ajax call as shown below..
$(document).ready(function() {
$.ajax({
url: "/yiite/index.php/includes/load_second #table",
type: 'GET',
data: {ID:ID,name:name,ord:ord},
success: function(responseText){
$('#new-nav1').append(responseText);
},
error: function(responseText){
}
});
});
For more information :-
http://api.jquery.com/jQuery.ajax/
Upvotes: 0