Forums › Forums › Search & Filter Pro › Infinite scroll not working on initial load
Tagged: infinite scroll
- This topic has 24 replies, 3 voices, and was last updated 6 years, 5 months ago by Ross.
-
Anonymous(Private) April 17, 2018 at 10:20 pm #172802
Ahh ok, thanks. We have some script that is doing what you suggest basically. Do you think that the AJAX is failing because this script is just run on doc ready?
// Filter - add dummy end date so the hidden field works with just start date $('.sf_date_field li:last-child input[name="_sfm_workshop_start_date[]"]').val('31/12/2040'); // If start date is empty give it today's date so it doesn't fail to load anything var now = new Date(); var today = ('0' + (now.getMonth()+1)).slice(-2) + '/' + ('0' + now.getDate()).slice(-2) + '/' + now.getFullYear(); $( 'form.searchandfilter' ).change(function() { $('.sf_date_field li:first-child input[name="_sfm_workshop_start_date[]"]').val(today); }); // Add TODAY date to Filter Bar search otherwise it submits an empty value $( '.page-id-22 .sf_date_field li:first-child input[name="_sfm_workshop_start_date[]"]').val(today);
Anonymous(Private) May 8, 2018 at 4:04 am #176241sorry for the length in time on replying to this one, I have mostly got everything to work except for one odd issue which is that when I go here https://mmworkshops.staging.wpengine.com/workshops/all-workshops/ on first visit a lot of times the infinite scroll doesn’t work but as soon as I filter as previously described it starts to work, however then if I visit https://mmworkshops.staging.wpengine.com/workshops/all-workshops/ again it works, private browser, new tab clear my cache full refresh, it just works. until it doesn’t, which seams to be the next day for me usually. Have you seen that before, I don’t believe this is related to the date issue which I believe is resolved. I don’t even get the Ajax spinner.
-
AuthorPosts