I am totaly new to web development and programming, I want to use Scrollify on my WP site.
So I want to load Scrollify only in one page, so I added this to functions.php
function load_js_assets() {
if( is_page( 26 ) ) {
wp_enqueue_script('scrollify', 'https://goodlifesoft.com/scrollify.js', array('jquery'), '', false);
}
}
I added a message in console to see that the file has been loaded.
I load the latest version of jquery in the header.php
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
I call the Scrollify function in footer.php
<script>
$(function() {
$.scrollify({
section : ".elementor-element.elementor-element.elementor-section-height-full.elementor-section-content-middle.elementor-section-boxed.elementor-section-height-default.elementor-section-items-middle.elementor-section.elementor-top-section",
});
});
</script>
And this is the message that I get in the console. Contents from console
This is working for me in JSfiddle https://jsfiddle.net/Balodis/w697stj5/60/
I would be very thankfull if someone could point out what I am doing wrong.
Thank you!