Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] Wywołanie funkcji, tylko jak?
Torowisko
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.05.2012

Ostrzeżenie: (0%)
-----


Witam,

korzystam z tego -

https://github.com/webcreate/infinite-ajax-scroll

Raczej staram się korzystać, wypełniłem poprawnie ten kawałek, mam na stronie paginację.

Kod
jQuery.ias({
    container : '.listing',
    item: '.post',
    pagination: '#content .navigation',
    next: '.next-posts a',
    loader: '<img src="images/loader.gif"/>'
});


W sekcji head wrzuciłem -

  1. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  2. <script type="text/javascript" src="/public/js/jquery.infinite.js"></script>


Jednak nie wiem jak wywołać cały ten skrypt, bo pewnie samo z siebie nic działać nie będzie.

Ten post edytował Torowisko 14.05.2012, 13:19:02
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
d3ut3r
post
Post #2





Grupa: Zarejestrowani
Postów: 709
Pomógł: 176
Dołączył: 24.10.2010

Ostrzeżenie: (0%)
-----


kluczowy fragment z dokumentacji:

Cytat
Default: “.next”
Enter the selector of the link element that links to the next page. The href attribute of this element will be used to get the items from the next page. Make sure there is only one(1) element that matches the selector.


Czyli musisz wskazać element który będzie źródłem adresu skąd pobrać następne elementy skrypt sam pobierze adres i wykona zapytanie o kolejną porcję danych.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 20:38