Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Navigate back to the last scroll position in Thumbnail Grid

    Bug Reports
    5
    14
    175
    Loading More Posts
    • 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
      Markus last edited by Markus

      Hey guys,

      its possible to navigate back in the Thumbnail Grid at same position and on same height where I was before?
      In my Project-Thumbnail Grid it doesn't work.

      Thanks and best regards
      Markus

      1 Reply Last reply Reply Quote 0
      • Richard
        Richard Global Moderator last edited by

        Dear Markus @Markus

        I believe you might be helped by the use of cookies:
        https://us.norton.com/internetsecurity-privacy-what-are-cookies.html

        There are Plugins for Cookies that work with wordpress however if they clash with Lay Theme this is something out of our control as they all have slightly different operations and keeping up with all these would be impossible, apologies that i cannot provide further support within this.

        But have a go if you wish, the simpler the better i would think.

        Alternatively if you wish to go a little into coding yourself (basics) you could find a workaround that fits for you:

        https://stackoverflow.com/questions/25168861/take-user-back-to-where-they-scrolled-to-on-previous-page-when-clicking-browser

        https://stackoverflow.com/questions/32573532/jquery-how-to-return-to-the-exact-same-scroll-position-when-going-back-to-previ/41588488

        https://stackoverflow.com/questions/17642872/refresh-page-and-keep-scroll-position

        This would require basic knowledge of JS / jQuery that you would be adding within "Lay - Options - Custom CSS & HTML:
        Screen Shot 2020-09-14 at 2.51.54 PM.png

        Additionally some documentation on the Lay Theme Website:

        https://laytheme.com/documentation.html#custom-javascript

        https://www.khanacademy.org/computing/computer-programming/html-css/web-development-tools/a/using-the-browser-developer-tools

        Best wishes and Good luck :)

        Sincerely
        Richard

        1 Reply Last reply Reply Quote 0
        • M
          Markus last edited by Markus

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

          Best,
          Markus

          1 Reply Last reply Reply Quote 0
          • M
            Markus last edited by Markus

            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 Reply Quote 0
            • Richard
              Richard Global Moderator last edited by

              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 Reply Quote 0
              • M
                Markus last edited by Markus

                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 Reply Quote 0
                • Baptiste
                  Baptiste last edited by Baptiste

                  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 Reply Quote 0
                  • Baptiste
                    Baptiste last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • M
                      Markus last edited by 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 1 Reply Last reply Reply Quote 1
                      • leooo
                        leooo last edited by

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

                        1 Reply Last reply Reply Quote 0
                        • Richard
                          Richard Global Moderator last edited by

                          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 Reply Quote 0
                          • leooo
                            leooo last edited by

                            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 Reply Quote 0
                            • Richard
                              Richard Global Moderator last edited by

                              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 Reply Quote 0
                              • Y
                                yelmarb @Markus last edited by

                                @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 Reply Quote 0
                                • First post
                                  Last post

                                Try this to fix issues before you post:

                                Use the Search Feature. Maybe there is already a solution to your issue.

                                1. Update Lay Theme and all Lay Theme Addons
                                2. Disable all Plugins
                                3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                                4. Now see if your problem solved itself
                                5. Go here, see if your problem is listed here:
                                Troubleshooting

                                When you post:
                                1. Post a link to where the problem is
                                2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                                Thanks!

                                Online Users

                                G
                                M
                                I
                                M

                                Recent Topics

                                • text underline

                                • open all links in a thumbnail grid in a new tab

                                • lazy loading affects project thumbnail mouseover images

                                laytheme.com