infinite-scroll

Laravel infinite scroll for pagination output

落花浮王杯 提交于 2020-01-17 05:53:23
问题 I'm new to laravel and I'm working on a project based on laravel version 4.2. I've got some problems with loading more results using scroll instead of default pagination. I know there are jQuery plugins that can help me out in this, but none of them or suggested ways in web could help me out well. so here is my code : laravel model //inside a AdGenerator class public function allAds(){ $allAds = DB::table('infos')->paginate(10); return $allAds; } laravel controller //inside controller $ads =

How to troubleshoot silently failing js in Rails?

六眼飞鱼酱① 提交于 2020-01-15 06:26:08
问题 It should be noted that I am not very proficient at using Firebug, but I haven't found any errors that explain the following issue. I have a feed.js.erb file containing the following code: var $foos = $('<%= escape_javascript(render(@foos)) %>'); $('#container').append($foos); $('#pagination_button a').attr('href', '<%= feed_path + '?page=' + @page %>'); When this ajax call is made the second time , it appears to fail silently. I see the appropriate response in the Firebug console, but $foos

Lazy load items with filtering

℡╲_俬逩灬. 提交于 2020-01-14 09:33:03
问题 I am using Backbone.js to load 20 items at a time on the page, getting more items when you scroll down to the bottom until there are none left to fetch from the server. At the same time, I want an input field up top that as you type a name, it filters the items that match. The issue is, if you haven't scrolled to the bottom yet and fetched the full set, the input filter will only match the items that are currently on the page. What is the best solution technically and visually for combining

Lazy load items with filtering

人盡茶涼 提交于 2020-01-14 09:31:37
问题 I am using Backbone.js to load 20 items at a time on the page, getting more items when you scroll down to the bottom until there are none left to fetch from the server. At the same time, I want an input field up top that as you type a name, it filters the items that match. The issue is, if you haven't scrolled to the bottom yet and fetched the full set, the input filter will only match the items that are currently on the page. What is the best solution technically and visually for combining

Trouble with continuous play on html5 audio player with pages loaded from Infinite Scroll

こ雲淡風輕ζ 提交于 2020-01-14 06:21:06
问题 I am building a site with 20 single song audio players on each page. The code I have is meant to play the next visible song at the end of each song. It works fine on the initial page, but once Paul Irish's infinite scroll loads new pages, the code does not work properly. Instead of playing the next song, it plays a random song on the page. I have noticed a pattern of it often playing a song 9 songs behind. The player is: https://github.com/pupunzi/jquery.mb.miniAudioPlayer The code I am using

Infinite Scroll on Mobile browsers

最后都变了- 提交于 2020-01-13 19:10:29
问题 I am trying to implement infinite scroll on my website and it works well on browsers on any computer, but it has issues on mobile browsers. So far, on chrome, if I don't zoom in or out it works ok but once I zoom either way it stops working. On safari it doesn't work at all. This is the code that I am using: $(window).on('scroll', function (e) { console.log(" window.scrollTop = " + $(window).scrollTop() + " document.height=" + $(document).height() + " window.height =" + $(window).height());

Infinite Scroll on Mobile browsers

僤鯓⒐⒋嵵緔 提交于 2020-01-13 19:10:01
问题 I am trying to implement infinite scroll on my website and it works well on browsers on any computer, but it has issues on mobile browsers. So far, on chrome, if I don't zoom in or out it works ok but once I zoom either way it stops working. On safari it doesn't work at all. This is the code that I am using: $(window).on('scroll', function (e) { console.log(" window.scrollTop = " + $(window).scrollTop() + " document.height=" + $(document).height() + " window.height =" + $(window).height());

trigger 'view more' button by scrolling

家住魔仙堡 提交于 2020-01-06 08:46:10
问题 I want to implement infinite scolling in my image gallery. By default, my image gallery displays the first 25 images. I have a 'view-more' button that makes an ajax call and loads in the next 25 images beneath the first 25 and so on with each click of the view-more button. What I want to do is trigger this view-more button by scrolling down the page. Scrolling 100px from the button would trigger the ajax load event and load in the next 25 images. Continuing downwards would trigger the next 25

on scrolled to add items in recyclerview always comes to top automatically when i scroll down

北城余情 提交于 2020-01-06 06:06:19
问题 I am implementing endless recycler view . Data is getting fine from server aslo scroll down getting down and show it. But on scroll it automatically comes to top again and again. I implemented number of solutions but doesn't work. here is bit of code. private int postNo = 15; public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); if (!lastTime) { if (dy > 0) { // check for scroll down visibleItemCount = layoutManager.getChildCount();

on scrolled to add items in recyclerview always comes to top automatically when i scroll down

杀马特。学长 韩版系。学妹 提交于 2020-01-06 06:05:14
问题 I am implementing endless recycler view . Data is getting fine from server aslo scroll down getting down and show it. But on scroll it automatically comes to top again and again. I implemented number of solutions but doesn't work. here is bit of code. private int postNo = 15; public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); if (!lastTime) { if (dy > 0) { // check for scroll down visibleItemCount = layoutManager.getChildCount();