Posted 20 январяJan 20 comment_198933 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/
20 январяJan 20 comment_198934 29 минут назад, afshin20 сказал: How can I use infinite scroll instead of paging? What code should I add to the template? Обратиться к кодеру на платной основе
29 январяJan 29 Author comment_199109 Can you fix the infinite scroll plugin? @Desti https://invisioncommunity.com/4guides/themes-and-customizations/javascript-framework/using-ui-widgets/ipsuiinfinitescroll-r47/
16 февраляFeb 16 Author comment_199974 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?
17 февраляFeb 17 comment_200076 7 minutes ago, afshin20 said: Can you advise which parts should be changed? Я также очень хочу сделать это на своем веб-сайте. Пожалуйста, может кто-нибудь помочь с советом?
17 февраляFeb 17 Author comment_200099 To do this, you need a JavaScript code in the form of Ajax, please help class="ipsLoading" id="elAjaxLoading"
17 февраляFeb 17 Author comment_200106 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/
18 февраляFeb 18 Author comment_200128 {{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.
18 февраляFeb 18 comment_200132 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 подойдет для решения задачи
18 февраляFeb 18 Author comment_200133 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?
18 февраляFeb 18 comment_200134 23 минуты назад, afshin20 сказал: I just want to know, is it possible to do this with javascript code without a plugin? Думаю да, для ipsInfScroll можно использовать примерно те же параметры что и в ipsPagination
18 февраляFeb 18 Author comment_200139 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.