WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Scrolling error (3 posts)

  1. 3lisays
    Member
    Posted 1 year ago #

    website is: http://www.incforge.com

    Problem I'm having is that upon trying to scroll to the bottom of the page, the pge bounces back to the bottom of the content. Very stressful.

    Anyways, this is my first design, I disabled all plugins, still happened. I re-enabled the SEO plugin, because it wasn't any of them, and still seeming to have problems.

    Open to suggestions, comments, and snippets of code to use.

    Many thanks.

    Also, I'm using Shoestrap theme, which is a Roots child theme/independent theme.

    I suspect there's an issue in the theme files, since it's not a plugin, and doesn't happen with other themes, but I'm not a programmer, and dunno where to look.

  2. Aaron
    Member
    Posted 1 year ago #

    I am not a javascript dude but the only part that I see right away that can do this is the below which is either in your header.php or your functions.php

    I don't know how to edit it to get it to stop but just copy/paste save it somewhere and then remove it. The scrolling will stop, but will everything else still work is the question.

    <script>
    !function ($) { $(function(){
    // fix sub nav on scroll
    var $win = $(window)
    , $nav = $('#main-subnav')
    , navTop = $('#main-subnav').length && $('#main-subnav').offset().top - 40
    , isFixed = 0
    processScroll()
    $win.on('scroll', processScroll)
    function processScroll() {
    var i, scrollTop = $win.scrollTop()
    if (scrollTop >= navTop && !isFixed) {
    isFixed = 1
    $nav.addClass('subnav-fixed')
    } else if (scrollTop <= navTop && isFixed) {
    isFixed = 0
    $nav.removeClass('subnav-fixed')
    }
    }
    })
    }(window.jQuery)
    </script>
  3. 3lisays
    Member
    Posted 1 year ago #

    Thanks, fixed. :)

Topic Closed

This topic has been closed to new replies.

About this Topic