diff options
Diffstat (limited to 'searx')
-rw-r--r-- | searx/static/plugins/js/infinite_scroll.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/searx/static/plugins/js/infinite_scroll.js b/searx/static/plugins/js/infinite_scroll.js index 1a95756a0..db84a6908 100644 --- a/searx/static/plugins/js/infinite_scroll.js +++ b/searx/static/plugins/js/infinite_scroll.js @@ -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) { - var body = $(data); - $('#pagination').remove(); - $('#main_results').append('<hr/>'); - $('#main_results').append(body.find('.result')); - $('#main_results').append(body.find('#pagination')); + $.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')); + } }); } } |