Site logo

Archived topic

sticky navigation not working without jquery

7 replies · Started by Deepak on October 3, 2020

Viewing posts 1–8 of 8

Hello,

I am using the release candidate of GP 3.X and in this theme the sticky navigation is not working if I jquery is disabled

is sticky navigation dependent on jquery?

I have added this in my functions.php

// Disable Jquery
add_filter( 'wp_enqueue_scripts', 'change_default_jquery', PHP_INT_MAX );

function change_default_jquery( ){
	
	if ( ! is_admin() ) {
    	wp_dequeue_script( 'jquery');
    	wp_deregister_script( 'jquery');   

	}
}

With this the sticky navigation doesn't seem to work, when I comment out this function then the sticky navigation is working

Regards
Deepak

Hi there,

yes, the Sticky Navigation requires jQuery. It is the only part of the theme that does. We intend to move that to vanilla JS in the future

:(

Is it planned with the current 3.0 release?

Regards
Deepak

No.. its not a free theme option - its part of GP Premium, we have yet to find a method that will keep backward compatibility but it is something we're looking into.

Thanks David for this information

You're welcome

Unfortunately we keep putting that on the back burner. There is not a good vanilla JS version that does all the features the current jQuery version does. So no time line for a replacement just yet.

This archived topic is closed to new replies.