Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
With this patch you will get trigger ajax load on scroll percentage threshold rather than random scroll
AND we offer 'show more' button before percentage threshold.
Best of both worlds.
see patch 1
Comment | File | Size | Author |
---|---|---|---|
#4 | ajax_loader_image_not_found-2667602-1.patch | 802 bytes | joseph.olstad |
#2 | trigger_ajax_load_on_scroll_percentage_threshold-2685121-1.patch | 1.84 KB | joseph.olstad |
Comments
Comment #2
joseph.olstadWith this patch, the ajax load behaves more naturally rather than simply loading on any scroll it loads when you've attained the percentage threshold.
This patch is designed for the 7.x-2.x release, it may also work on 8.x however I haven't tested 8.x yet.
Comment #3
joseph.olstad'percent limit' is actually what I called it in the code.
Prior to this patch the scroll threshold didn't seem to do much of anything. Now the percent limit kicks in and we display the "show more" button until the percent limit is reached, at that point the ajax call is made and the loading... ajax loading image shows up as expected.
Comment #4
joseph.olstadHere's an 8x patch, haven't tested it.
Comment #5
joseph.olstadPatch #2 is the 7x patch, its working well for us
Patch #4 is the 8x patch, haven't tested it, have no idea if it works or not
Comment #6
Sam152 CreditAttribution: Sam152 at PreviousNext commentedI don't understand why we need this? What kind of advantage is a percentage giving us, especially given it has to be adjusted manually based on how tall the document is?
There are also coding standard issues and uncached calls to $(document).
Comment #7
joseph.olstadSam152, the idea is to be able to scroll closer down to the bottom of the screen before the actual ajax call 'fires' , thats why the %'age
Comment #8
Sam152 CreditAttribution: Sam152 at PreviousNext commentedThe pixel based offset was relative to the pager, which would be the bottom of the view. If we wanted to scroll closer to the bottom of the view, we could just reduce the pixel scroll threshold.
Leaving as postponed. The extra code and complexity in this case isn't worth what this feature is offering.
Comment #9
andypostI bet it could be closed as duplicate of #2950901: Allow setting scroll threshold and delay
it means you can configure and even override threshold runtime