[Resolved] Smooth Scroll Smart Slider 3

Home Forums Support [Resolved] Smooth Scroll Smart Slider 3

Home Forums Support Smooth Scroll Smart Slider 3

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #650073
    Dan

    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?

    #650771
    Leo
    Staff
    Customer Support

    Hi there,

    There’s a javascript error happening.

    Can you try deactivating your other plugins just to rule out some sort of conflict?

    #650809
    Dan

    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.

    #650827
    Leo
    Staff
    Customer Support

    What version of GP Premium are you using?

    #650834
    Dan

    2.1.3 Just installed it and started building this site.

    #650838
    Leo
    Staff
    Customer Support

    That’s the free theme version.

    Check Dashboard > Plugins.

    #650847
    Dan

    Oops. I mean 1.7.1 🙂

    #650848
    Leo
    Staff
    Customer Support

    Is it activated right now?

    #650866
    Dan

    No, but I will activate it in 1 second.

    #650883
    Leo
    Staff
    Customer Support

    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 🙂

    #650885
    Dan
    #650892
    Leo
    Staff
    Customer Support

    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.

    #650898
    Dan

    As I’m new to this smooth-scroll, how would you normally add the class to the tag?

    #650900
    Leo
    Staff
    Customer Support
    #650906
    Tom
    Lead Developer
    Lead Developer

    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/

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.