Jump to content

Featured Replies

How can I use infinite scroll instead of paging?
What code should I add to the template? @Desti @Exception 

https://invisioncommunity.com/4guides/themes-and-customizations/javascript-framework/using-ui-widgets/ipsuiinfinitescroll-r47/

 

128.jpg

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/
Share on other sites
29 минут назад, afshin20 сказал:

How can I use infinite scroll instead of paging?
What code should I add to the template?

Обратиться к кодеру на платной основе

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=198934
Share on other sites
  • 2 недели спустя...
  • 3 недели спустя...
On 1/20/2024 at 10:36 AM, Exception said:

Обратиться к кодеру на платной основе

Can you tell me where the changes in the template should be made so that this infinite scroll is displayed?

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=199974
Share on other sites

Can you guide me, what should I do? @Desti

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=199987
Share on other sites

Can you advise which parts should be changed?

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200075
Share on other sites
7 minutes ago, afshin20 said:

Can you advise which parts should be changed?

Я также очень хочу сделать это на своем веб-сайте. Пожалуйста, может кто-нибудь помочь с советом?

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200076
Share on other sites

To do this, you need a JavaScript code in the form of Ajax, please help

class="ipsLoading" id="elAjaxLoading"

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200099
Share on other sites
On 1/20/2024 at 10:05 AM, afshin20 said:

How can I use infinite scroll instead of paging?
What code should I add to the template? @Desti @Exception 

https://invisioncommunity.com/4guides/themes-and-customizations/javascript-framework/using-ui-widgets/ipsuiinfinitescroll-r47/

 

128.jpg

 

bruce-lee-kick.gif

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200106
Share on other sites
  {{if $pages > 1}}
    <script>
        $(window).on('scroll', function() {
            if ($(window).scrollTop() + $(window).height() >= $(document).height()) {
                loadMoreItems();
            }
        });

        function loadMoreItems() {
            var currentPage = parseInt('{$page}' || '1');
            var nextPage = currentPage + 1;
            if (nextPage <= {$pages}) {
                var url = '{$baseUrl->setPage($pageParam, "' + nextPage + '")}';
                $.ajax({
                     url: '/files?page=' + nextPage,
                    type: 'GET',
                    success: function(response) {
                        var items = $(response).find('.item');
                        $('#itemList').append(items);
                    },
                    error: function() {
                          // Error message if needed                    }
                });
            }
        }
    </script>
{{endif}}

@Exception @Desti This code was in the stackoverflow website, can you tell me how I can do this?

Please, I need it.

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200128
Share on other sites
1 час назад, afshin20 сказал:
  {{if $pages > 1}}
    <script>
        $(window).on('scroll', function() {
            if ($(window).scrollTop() + $(window).height() >= $(document).height()) {
                loadMoreItems();
            }
        });

        function loadMoreItems() {
            var currentPage = parseInt('{$page}' || '1');
            var nextPage = currentPage + 1;
            if (nextPage <= {$pages}) {
                var url = '{$baseUrl->setPage($pageParam, "' + nextPage + '")}';
                $.ajax({
                     url: '/files?page=' + nextPage,
                    type: 'GET',
                    success: function(response) {
                        var items = $(response).find('.item');
                        $('#itemList').append(items);
                    },
                    error: function() {
                          // Error message if needed                    }
                });
            }
        }
    </script>
{{endif}}

@Exception @Desti This code was in the stackoverflow website, can you tell me how I can do this?

Please, I need it.

Я не занимаюсь благотворительностью и не пишу код за спасибо.

ips.ui.infinitescroll подойдет для решения задачи

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200132
Share on other sites
2 minutes ago, Exception said:

ips.ui.infinitescroll подойдет для решения задачи

I just want to know, is it possible to do this with javascript code without a plugin?

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200133
Share on other sites
23 минуты назад, afshin20 сказал:

I just want to know, is it possible to do this with javascript code without a plugin?

Думаю да, для ipsInfScroll можно использовать примерно те же параметры что и в ipsPagination

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200134
Share on other sites

Can you tell me what data I should write for these cases? I don't know exactly what to write? @Desti @Exception
scrollScope, container, url, pageParam

<script>
ips.ui.infinitescroll({
  scrollScope: 'body',
  container: '#content',
  distance: 50,
  url: '{$subcategory->url()}',
  pageParam: 'page',
  loadingTpl: 'core.infScroll.loading',
  pageBreakTpl: 'core.infScroll.pageBreak',
  disableIn: 'phone,tablet,desktop'
});
</script>

 

Link to comment
https://ipbmafia.ru/topic/26302-infinite-scroll/?&do=findComment&comment=200139
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.


Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.