问题描述:

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.

网友答案:

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
});
网友答案:

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/append/

http://api.jquery.com/jQuery.ajax/

相关阅读:
Top