well right now I basically have the jquery load function like this
$('#results').load("sources.php?source=1&page=<?=$_GET['page']?>&search=<?=$_GET['search']?>");
so it's loading t开发者_StackOverflow中文版hat to the results div, but right after that i'd like to run essentially the same thing but
$('#results').load("sources.php?source=2&page=<?=$_GET['page']?>&search=<?=$_GET['search']?>");
how could i make it so it simply adds the content of the second load to the results div, as oppose to just replacing the existing content?
Thanks
You could use the get()-function instead of load().
$.get(url, function(data) {
$('#results').append(data);
});
精彩评论