Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Multiple anchor points smooth scroll and issue at top

Multiple anchor points smooth scroll and issue at top

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 590 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DMBD Offline
    DMBD Offline
    DMB
    wrote on last edited by
    #1

    Hi there, I have a bunch of text links in a text block, in a row at the top of my page.
    For each text link I have clicked 'link' and then entered an ID which corresponds to an ID I have given each row below in the gridder.

    Works like a dream to navigate apart from on one or two pages where if after clicking and navigating to a row with the aref link, when you scroll back up to the top of the page it cuts off some of the very first row at the top UNLESS you scroll all the way to the bottom of the page and then back to the top. After that it works all the time, weird. Any thoughts?

    Also I wanted to smooth scroll all my anchor points. If ound another thread on here and armin had written this jQuery for someone:

    jQuery(document).ready(function(){
    jQuery('body').on('click', '.js-scrollTo', function(event) {
    event.preventDefault();
    var id = jQuery(this).attr('href');
    jQuery('html, body').animate( { scrollTop: jQuery(id).offset().top }, 750 );
    });
    })

    It doesnt really work for me, even if I try replacing the class with my ID. Ideally id like a bit of jQuery that animates all anchor point links. I can easily enter all the IDs if I have to though.

    Do you have any ideas on this?

    Thanks!

    Duncan

    DMBD 1 Reply Last reply
    0
    • DMBD DMB

      Hi there, I have a bunch of text links in a text block, in a row at the top of my page.
      For each text link I have clicked 'link' and then entered an ID which corresponds to an ID I have given each row below in the gridder.

      Works like a dream to navigate apart from on one or two pages where if after clicking and navigating to a row with the aref link, when you scroll back up to the top of the page it cuts off some of the very first row at the top UNLESS you scroll all the way to the bottom of the page and then back to the top. After that it works all the time, weird. Any thoughts?

      Also I wanted to smooth scroll all my anchor points. If ound another thread on here and armin had written this jQuery for someone:

      jQuery(document).ready(function(){
      jQuery('body').on('click', '.js-scrollTo', function(event) {
      event.preventDefault();
      var id = jQuery(this).attr('href');
      jQuery('html, body').animate( { scrollTop: jQuery(id).offset().top }, 750 );
      });
      })

      It doesnt really work for me, even if I try replacing the class with my ID. Ideally id like a bit of jQuery that animates all anchor point links. I can easily enter all the IDs if I have to though.

      Do you have any ideas on this?

      Thanks!

      Duncan

      DMBD Offline
      DMBD Offline
      DMB
      wrote on last edited by
      #2

      Actually its Ok I worked it all out! :sunglasses:

      1 Reply Last reply
      0
      • V Offline
        V Offline
        victor
        wrote on last edited by
        #3

        Hello,

        I know this issue is quite old but I'm facing exactly the same problem!
        Any clues on how you fixed it?

        Thanks

        Victor

        1 Reply Last reply
        0
        • RichardR Offline
          RichardR Offline
          Richard
          Global Moderator
          wrote on last edited by
          #4

          Dear Victor @victor

          Am i correct that your issue lies with scrolling upwards in general on your page, and you have created another thread on this?

          Best :)
          Richard

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          I also code custom websites or custom Lay features.
          šŸ’æ Email me here: šŸ’æ
          info@laytheme.com

          Before you post:
          1. When using a WordPress Cache plugin, disable it or clear your cache.
          2. Update Lay Theme and all Lay Theme Addons
          3. Disable all Plugins
          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

          This often solves issues you might run into

          When you post:
          1. Post a link to where the problem is
          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
          Online Users
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search