Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main(request):
- page=str(1)
- d3 = requests.get('https://d3.ru/api/posts/?sorting=rating&threshold_date=day&page='+page).json()
- page=str(2)
- page=str(3)
- page=str(4)
- $(window).scroll(function () {
- if ($(window).scrollTop() + $(window).height() == $(document).height()) {
- alert("uzhe dno");
- });
- $.ajax({
- url: "{% url 'main' %}",
- type: "GET",
- //call main
- });
- $(window).scroll(function() {
- if($(window).scrollTop() == $(document).height() - $(window).height()) {
- // ajax call get data from server and append to the div
- }
- });
Add Comment
Please, Sign In to add comment