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. Bug Reports
  3. Navigate back to the last scroll position in Thumbnail Grid

Navigate back to the last scroll position in Thumbnail Grid

Scheduled Pinned Locked Moved Bug Reports
16 Posts 6 Posters 872 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.
  • M Offline
    M Offline
    Markus
    wrote on last edited by Markus
    #3

    Hey @Richard-Keith, thank you very much for your answer. I check your links, thanks! :)

    Best,
    Markus

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Markus
      wrote on last edited by Markus
      #4

      Hey @Richard-Keith It works... your first link ;)

      I'm still trying to improve the code. It slides too long back, but changing the numbers of the code has caused disruptions so far.

      Best & thanks!
      Markus

      <script>
      window.laytheme.on("newpageshown", function(layoutObj, type, obj){
      
      
        jQuery(window).scroll(function () {
              //set scroll position in session storage
              if (jQuery(window).scrollTop() > 500)
                sessionStorage.scrollPos = jQuery(window).scrollTop();
            });
      
            var init = setTimeout(function(){
               //return scroll position in session storage
               if (sessionStorage.scrollPos > 500){
                  jQuery("html").animate({ scrollTop: sessionStorage.scrollPos },2000);
                }
              },1000);
            window.onload = init;
        
        });
      </script>
      
      1 Reply Last reply
      0
      • RichardR Offline
        RichardR Offline
        Richard
        Global Moderator
        wrote on last edited by
        #5

        Dear Markus @Markus

        So changing the number's / values doesn't work for you?
        Just to understand better "It slides too long back"

        This means it goes too far past the point? not that it is slow,

        Could you post a link to your website with the example in question and i will have a better idea, strange that changing the values causes such a disruption, are you making sure that both '500' & the secondary '500' are set the same e.g '700' & '700" ?

        Best
        Richard

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Markus
          wrote on last edited by Markus
          #6

          Hey @Richard-Keith, thanks for your answer.

          I only tested the code for some minutes. No more in the site :(
          If you like you can put the code in every lay theme "Custom <head> content" area.

          Changing numbers works not fine :( Destroys the complete function often, the layout begins to tremble.

          Would be great if the site comes back only to the last position without the "special effects" ;)

          Best & have a great week!
          Markus

          1 Reply Last reply
          0
          • BaptisteB Offline
            BaptisteB Offline
            Baptiste
            wrote on last edited by Baptiste
            #7

            Hey @Markus,

            Is it working for you? I'm using the fullscreen slider but it doesn't seams to work in my case. If you found a solution it would be nice.

            Best.

            1 Reply Last reply
            0
            • BaptisteB Offline
              BaptisteB Offline
              Baptiste
              wrote on last edited by
              #8

              Any solutions or ideas about that @arminunruh or @Richard-K?

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Markus
                wrote on last edited by Markus
                #9

                Hey @Baptiste

                Fullscreen slider no idea ;(

                But after the last update it works great with the "back-function" in the "thumbnail grid" without special codes.

                Best

                Y 1 Reply Last reply
                1
                • leoooL Offline
                  leoooL Offline
                  leooo
                  wrote on last edited by
                  #10

                  it seemed to work for a while now, is it broken again for some of you as well?

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

                    Dear @leooo

                    Just because there are a few different points on this thread - can we clarify what is going wrong?

                    " is it possible to navigate back in the Thumbnail Grid at same position and on same height where I was before"


                    Best
                    Richard
                    1 Reply Last reply
                    0
                    • leoooL Offline
                      leoooL Offline
                      leooo
                      wrote on last edited by
                      #12

                      Yea exactly. When I go back the scroll position is on top again. I tried to deactivate lazy loading and animation when you scroll down. But it didn’t help.
                      theschnitt.de is the site. It’s down though this moment. I am not happy with the host. Dreamhost. What do you guys use?

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

                        Dear @leooo

                        On the installation page are some recommends ⚡️

                        www.greengeeks.com Green Geeks is eco-friendly, has unlimited web space and a well designed control panel. You can get a free domain like .com, .eu, .net, .biz. The "Lite" Web-Hosting package is enough.

                        www.bluehost.com is the cheapest host of the three. The plan “Basic” is enough. It comes with 50GB SSD Webspace and a free domain.

                        www.dreamhost.com You would need “Shared Website Hosting” → “Shared Starter”. You get unlimited webspace and a free .com domain. I like their control panel because it’s really clean and well structured. Laytheme.com and my own website run on dreamhost.


                        Best wishes
                        Richard
                        1 Reply Last reply
                        0
                        • M Markus

                          Hey @Baptiste

                          Fullscreen slider no idea ;(

                          But after the last update it works great with the "back-function" in the "thumbnail grid" without special codes.

                          Best

                          Y Offline
                          Y Offline
                          yelmarb
                          wrote on last edited by
                          #14

                          @Markus Is there a Lay Theme option to navigate back to the last scroll position or do you need add some custom code?

                          I pasted in some of the code from the links above / Stack Overflow but none of those worked for me.

                          Is there another piece of code that someone could share?

                          1 Reply Last reply
                          0
                          • arminunruhA Offline
                            arminunruhA Offline
                            arminunruh
                            Global Moderator
                            wrote on last edited by
                            #15

                            hey can u update lay theme?

                            now if your website doesn't do a refresh when you navigate, it should work again!

                            dont use the setting "Never change scrolling position when navigating" for this
                            and dont use any extra javascript for this

                            Y 1 Reply Last reply
                            0
                            • arminunruhA arminunruh

                              hey can u update lay theme?

                              now if your website doesn't do a refresh when you navigate, it should work again!

                              dont use the setting "Never change scrolling position when navigating" for this
                              and dont use any extra javascript for this

                              Y Offline
                              Y Offline
                              yelmarb
                              wrote on last edited by
                              #16

                              @arminunruh Thanks Armin, I had “Disable Ajax / Compatibility Mode” checked. I’ve unchecked it and now it the back button goes back to the last scroll position. Solved.

                              1 Reply Last reply
                              1
                              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
                              D
                              Double
                              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