Parallax scrolling feature causing an issue with plugin - Acme Themes

Best Premium and Free WordPress Themes Forums Corporate Plus Pro Parallax scrolling feature causing an issue with plugin

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27715
    Chris Barnett
    Participant

    We’re using a plugin called “Custom Product Tabs for WooCommerce” to add extra tabs to our product pages.

    However, as you click each tab the browser scrolls a few pixels towards the top of the site.

    I’ve investigated this issue with the plugin developer.

    They identified this code in corporate-plus-custom.js as the source as the issue:

    $(‘a[href*=”#”]’).click(function(event){
    $(‘html, body’).animate({
    scrollTop: $( $.attr(this, ‘href’) ).offset().top-$(‘.at-navbar’).height()
    }, 1000);
    event.preventDefault();
    });

    If I comment out this code then the site works as expected.

    What can we do to fix this without editing the code?

    Thanks
    Chris

    #27723
    Acme Themes
    Keymaster

    Hello Chris,

    Since you have dig that code this much , we would like to recommend you to change the selector
    from $(‘a[href*=”#”]’) to $('a[href*="\\#"]'),

    let us know if this fix the issue.

    Thanks!

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