smooth scroll to single page sections

Support Forums for LiveMesh Themes & Plugins Forums Appdev Theme Support smooth scroll to single page sections

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3527
    Palmtreepalmtree
    Participant

    Hi Code Master,

    When I don’t activate “Single Page Site” (enabling auto generated menu) and instead by using WordPress default MENU I manually add section URL ids as “submenu (as drop-down)” say adding 2 different sections to one single page, the smooth scroll action isn’t working in between sections even though they are in the same single page. This doesn’t happen if the sections I manually added in the WordPress MENU aren’t “submenu (as drop-down)” but “parent menu”.

    Please note that this situation occurs only in normal screen display.
    When the screen is smaller like for mobile devices, regardless of location of section menu being “sub” or “parent”, smooth scroll works fine.

    Hope this makes sense.
    I think as long as the section URL links are pressed in the menu when they are in the same single page (whether it’s located in submenu or parent menu), the smooth scroll should work.

    Is that possible for you to investigate this?
    Thank you!
    Toshi

    #3554
    RaghavendraRaghavendra
    Moderator

    Will look into the issue. Thanks for bringing this to my notice. Should be easy to fix but my question to you is – is this really required for all? Internal links in the drop down menu is not common (dropdown menu itself is not common in single page sites) and then I guess we are just missing an effect and not the function itself; the link I assume still scrolls to the element. Will take a look.

    #3558
    Palmtreepalmtree
    Participant

    Thank you for looking into this!
    I agree with you, Internal drop down by using dropdown menu is missing point… It may not be commonly used… however sometimes useful when people want to direct viewers to specific section in the same page. Rather than jumping to the section, it’s nice to have smooth scroll effect.

    Toshi

    #3581
    RaghavendraRaghavendra
    Moderator

    Sorry this took some time due to holidays although the change was small. Here is the change you need to make. Pls edit the file js/main.js at line number 140 from

                   $('#primary-menu > ul > li > a[href*=#]').smoothScroll(
    

    to

                    $('#primary-menu a[href*=#]').smoothScroll(
    

    the smooth scroll should work fine for dropdown internal elements as well.

    #3597
    Palmtreepalmtree
    Participant

    Thanks a lot!

    line 140 is now $('.single-page-template #primary-menu a[href*=#]').smoothScroll(
    not $('#primary-menu a[href*=#]').smoothScroll(. There is “.sigle-page-template” up front is that ok?

    Also there are couple of lines that has the same codes as line 140 you told me to replace, but just the line 140 is fine?

    Happy New Year:-)
    Toshi

    #3608
    RaghavendraRaghavendra
    Moderator

    No problems if you have .single-page-template and no need to change the other places. They exist for tracking purposes as you scroll down the page and for dropdowns you do not need to track and highlight menu items. Happy new year to you as well. Thanks 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Appdev Theme Support’ is closed to new topics and replies.