• Resolved mediaj

    (@mediaj)


    Hi,
    First of all, thank you for the great plugin!
    While everything works fine, I would like to know if you can set a different offset value when page is at top. Because my site has a banner that is fixed at the top of the website(not fixed to follow when scroll) and because of this, when anchor link is clicked, it stops at different pixel. I want normal offset at 120px but 180px when page is at top.

    I used jQuery

    if(($('body').find('p.woocommerce-store-notice').length !== 0) && ($(window).scrollTop() === 0)) {
          $('html, body').animate({
              scrollTop: $( $.attr(this, 'href') ).offset().top - 180
         }, 800);
      }

    as conditional rule which used to work, but after installing your plugin, this doesn’t work. So I’m stuck.
    Help is greatly appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    Is it possible to see your page/site?

    You could probably do it via CSS in addition to javascript. If I could see your page I’d be able to help.

    Thread Starter mediaj

    (@mediaj)

    Sorry for late reply.
    Here is the link.
    https://ausnatdev.wpengine.com/

    Plugin Author malihu

    (@malihu)

    You can solve the issue with CSS. Add the following to your additional/custom CSS and it should fix all related issues:

    .white .site-inner {
        margin-top: 72px !important;
    }

    Let me know

    Thread Starter mediaj

    (@mediaj)

    Thanks ?? That worked great.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘different offset value when page is at top’ is closed to new replies.