Archived topic
Smooth Scroll Smart Slider 3
20 replies · Started by Dan on August 15, 2018
Hello. I'm trying to get the smooth scroll to work from a Smart Slider 3 button to another part of the same page and can't seem to figure it out. I have added smooth-scroll to the CSS Class section in the Smart Slider 3 button Advanced tab. I have also added the id to the section of the page and entered that into the Smart Slider as well, but it just jumps to that section instead of scrolling. Is there anything else I need to do?
Hi there,
There’s a javascript error happening.
Can you try deactivating your other plugins just to rule out some sort of conflict?
Just turned off every plugin except for Smart Slider 3 and it still jumps to the section. It's still like that if you want to look.
What version of GP Premium are you using?
2.1.3 Just installed it and started building this site.
That's the free theme version.
Check Dashboard > Plugins.
Oops. I mean 1.7.1 :)
Is it activated right now?
No, but I will activate it in 1 second.
Ok no javascript error is happening which is good. That means one of your other plugin is causing the issue.
The smooth scroll isn't working because the smooth-scroll class is applied to the <div> of the button and not the link <a> tag itself.
Are you able to modify that? If not then you might need to ask Smart Slider on how to add the class to the <a> tag itself.
Let me know if this helps :)
Here's where I put the smooth-scroll:
https://www.dropbox.com/s/8q64ryfz5u9uyzh/Screen%20Shot%202018-08-16%20at%2012.03.14%20PM.png?dl=0
Hope that link works.
Yes I know but unfortunately it's not applying to the <a> tag itself and GP has no control over it.
Best to check with their support.
As I'm new to this smooth-scroll, how would you normally add the class to the tag?
If you can't add the class to the link, you can do something like this:
add_filter( 'generate_smooth_scroll_elements', function( $elements ) {
$elements[] = '.n2-ss-button-container a[href*="#"]';
return $elements;
} );
Adding PHP: https://docs.generatepress.com/article/adding-php/