V
V
Vladisus2015-04-12 21:58:36
Django
Vladisus, 2015-04-12 21:58:36

Django-endless-pagination how to put a delay?

I want to show the loader before Django returns the items to me, but without a delay it happens instantly...
How can I put a delay ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2015-04-13
@sim3x

You don’t need to set a delay. You
need to change
https://github.com/frankban/django-endless-paginat...
or rather add it there

$.ajaxSetup({
    beforeSend: function (xhr, settings) {
/// показать лоадер
    },
    complete: function (xhr, settings) {
/// убрать лоадер 
    },
    error: function (xhr, settings) {
/// 
    }
  });

api.jquery.com/jQuery.ajax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question