Home Forums WoodMart support forum Javascript automatic anchor scroll stop position

Javascript automatic anchor scroll stop position

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #73652

    JeremyvanderWegen
    Participant

    Hello,

    How can we change the stop position of the automatic anchor (#) scroll? Like when a user clicks on customer review anchor link on productpage.

    I know you can adjust this within a javascript file. Can you point which file and on which line?

    See also attachments.

    Thanks,
    Jeremy

    Attachments:
    You must be logged in to view attached files.
    #73667

    Artem Temos
    Keymaster

    Hi,

    Try to add the following code snippet to the Custom JS area in Theme Settings on document ready to do this

    jQuery('.woocommerce-review-link').click(function(e) {
       e.preventDefault();
       jQuery([document.documentElement, document.body]).animate({
          scrollTop: jQuery("#reviews").offset().top - 100
       }, 800);
    })

    Regards

    #73693

    JeremyvanderWegen
    Participant

    Thanks, working 🙂

    Great support.

    Regards

    #73696

    Artem Temos
    Keymaster

    You are welcome, we are always happy to help you, write us when you have any difficulties or issues with our theme.

    And we would be glad if you will rate our theme with 5 stars on Theme Forest in case you are satisfied with our theme and customer service http://themeforest.net/downloads

    Thank you in advance 🙂

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)