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. Skip Button (reversed back to top button script)

Skip Button (reversed back to top button script)

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 474 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.
  • A Offline
    A Offline
    alexandre
    wrote on last edited by
    #1

    Hey guys,

    Could you provide a script for the same "scroll up" animation used with the "back to top button" only in reversed direction? I want to add a "skip" button that uses the same "scroll" animation. I tried what you've posted in this thread (Oct 11, 2016) but it doesn't work properly. I've implemented ID and links but when I click the "skip" button it quickly skips over to the target and then back up again. It doesn't stay on the target location. Also, did I place the script in the right place (See attached photo) and is this still the right script? Haven't found a new thread.

    Thanx a lot and kind regards,
    Alexandre

    0_1562419751278_Bildschirmfoto 2019-07-06 um 15.26.48.png

    1 Reply Last reply
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Dear @alexandre
      place it in the CUSTOM HTML section. Not CSS.

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexandre
        wrote on last edited by alexandre
        #3

        Hey @mariusjopen

        Ah thanx a lot. Unfortunately the script doesn't seem to work. Clicking the button resolves in an instant switch to its assigned destination without any scroll animation..

        this is the script i used:

        <script>
        jQuery(document).on("click", "a[href*=#]", function(e){
        e.preventDefault();
        var targetId = jQuery(this).attr("href");
        jQuery('html, body').animate({
        scrollTop: jQuery(targetId).offset().top,
        },
        {
        duration: 2000,
        easing: "easeOutSine"
        });
        });
        </script>

        Cheers,
        Alexandre

        0_1562701168365_Bildschirmfoto 2019-07-09 um 21.38.26.png

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

          Dear @alexandre
          can you test the animation on a different browser?
          Best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alexandre
            wrote on last edited by
            #5

            Hey @mariusjopen

            I did test it in Chrome and Safari and both don't execute it.

            Thanx,
            Alexandre

            1 Reply Last reply
            0
            • mariusjopenM Offline
              mariusjopenM Offline
              mariusjopen
              Global Moderator
              wrote on last edited by
              #6

              Dear @alexandre
              can you post a link that we can have a look?

              Thank you!

              Marius

              www.mariusjopen.world

              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
              arminunruhA
              arminunruh
              F
              francesco
              L
              lurchifon
              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