Tagged: enfold, infinite scroll
Hey
Following up on the request from Ismael to stat a new thread for this subject.
I’ve created a new page with the right code and only six posts.
Thanks
Richard
Hey Richard,
Thank you for the update.
The console throws this error.
TypeError: jQuery(…).jscroll is not a functiontest-2020-01-29:194:22
https://sladedesign.co.uk/test-2020-01-29/:194
It says here that the function is not found or undefined. Did you load the jscroll script as instructed in the previous thread?
function ava_load_jscroll(){
wp_enqueue_script('jscroll', get_stylesheet_directory_uri().'/js/jquery.jscroll.min.js', array( 'jquery') );
}
add_action( 'wp_enqueue_scripts', 'ava_load_jscroll' );
Add it in the functions.php file. Also, try to wrap the jscroll init function in a document.ready event just to make sure that the page or the elements are ready before calling the jscroll function.
$( document ).ready(function() {
console.log( "ready!" );
// jscroll initialize here
});
// https://learn.jquery.com/using-jquery-core/document-ready/
Best regards,
Ismael
Hey Ismael
Thanks for the information, this is fixed now using your tweaks.
Excellent support both from users and moderators, as always.
Richard
Hi Richard,
Great, I’m glad that Ismael could help you out and thanks for the kind feedback. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
Thanks Rikard.
Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon