Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • 2 недели спустя...
  • 3 недели спустя...
  • Author
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?

7 minutes ago, afshin20 said:

Can you advise which parts should be changed?

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

  • Author
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

  • Author
  {{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.

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 подойдет для решения задачи

23 минуты назад, afshin20 сказал:

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

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

  • Author

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>

 

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.