3

このプラグインを使用して、codeigniter のページネーションに無限スクロールを追加しようとしています。

http://www.infinite-scroll.com

これはこれまでの私のコードです:

<script type = "text/javascript">

    $('#comments').infinitescroll({

        navSelector  : "a#next:last",    // selector for the paged navigation (it will be hidden)
        nextSelector : "a#next:last",    // selector for the NEXT link (to page 2)
                    itemSelector : "#comments"       // selector for all items you'll retrieve
              });

</script>

これがデフォルトの使用法です。#comments が私のコンテンツを保持していると仮定しましょう。私のページ分割されたページは次のようになります。

http://localhost/ci/index.php/chat/load/p1u/10
http://localhost/ci/index.php/chat/load/p1u/20

このコード行を追加して機能させましたが、成功しませんでした:

<a id="next" href="http://localhost/ci/index.php/chat/load/p1u/10">next page</a>

何か案は?

4

3 に答える 3

1

$config["use_page_numbers"]/10 /20 /30 の代わりに /1 /2 /3 を使用する場合は、pagination.phpで usingに切り替えます。

于 2013-01-06T02:33:24.557 に答える