mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
Merge pull request #1766 from dalf/fix-infinite-scroll
[mod] infinite scroll: XHR requests are sent with the header "Accept: text/html"
This commit is contained in:
commit
54675c7690
@ -5,12 +5,18 @@ $(document).ready(function() {
|
||||
var formData = $('#pagination form:last').serialize();
|
||||
if (formData) {
|
||||
$('#pagination').html('<div class="loading-spinner"></div>');
|
||||
$.post('./', formData, function (data) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: './',
|
||||
data: formData,
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
var body = $(data);
|
||||
$('#pagination').remove();
|
||||
$('#main_results').append('<hr/>');
|
||||
$('#main_results').append(body.find('.result'));
|
||||
$('#main_results').append(body.find('#pagination'));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user