Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • 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. Navigate to the last scroll position when coming back to the homepage

Navigate to the last scroll position when coming back to the homepage

Scheduled Pinned Locked Moved General Discussion
8 Posts 4 Posters 1.8k Views 2 Watching
  • 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.
  • J
    J
    Johan
    wrote on last edited by
    #1

    After viewing a projet, I would like to come back to the homepage previous scrolled position when I press my browser back button (history.back()). Since I have a lot of projects displayed on my home, it's quite annoying for the user to come back to the top of the page.
    Is there a way I can get around this? I guess using Lightbox addon would do the job, but I would prefer having one page (with a proper url) per project.
    If anyone had any idea it would be super nice !
    Thanks a lot
    Johan

    1 Reply Last reply
    0
    • J
      J
      Johan
      wrote on last edited by Johan
      #2

      Any clue @mariusjopen ? It's for Simon Koy's website http://simonkoy.de

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

        Hey Johan!

        Oh, so normally this works, but only on pages where theres no project thumbnail overview grid.

        I need to improve this!

        J 1 Reply Last reply
        0
        • arminunruhA arminunruh

          Hey Johan!

          Oh, so normally this works, but only on pages where theres no project thumbnail overview grid.

          I need to improve this!

          J
          J
          Johan
          wrote on last edited by
          #4

          @arminunruh Thanks a lot for your answer. Is there a trick I should use until you implement this functionality?

          1 Reply Last reply
          0
          • J
            J
            Johan
            wrote on last edited by Johan
            #5

            I tried something like :

            jQuery(document).ready(function($) {
               $('a.thumb').on('click', function(){
                  sessionStorage["scrollPosition"] = $(window).scrollTop();
               });
               $(window).scrollTop(sessionStorage["scrollPosition"]);
               sessionStorage.clear();
            });
            

            but it doesn't work.

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

              Hi @Johan
              have a look how to deal with Javascript here:
              http://laytheme.com/documentation.html#custom-javascript

              I hope that will work out for you.

              All the best!

              Marius

              www.mariusjopen.world

              J 1 Reply Last reply
              0
              • mariusjopenM mariusjopen

                Hi @Johan
                have a look how to deal with Javascript here:
                http://laytheme.com/documentation.html#custom-javascript

                I hope that will work out for you.

                All the best!

                Marius

                J
                J
                Johan
                wrote on last edited by
                #7

                @mariusjopen Thanks a lot. I will find a way !

                1 Reply Last reply
                1
                • L
                  L
                  lukaszlive
                  wrote on last edited by
                  #8

                  Hi Johann,

                  did you made it work .. searching for a solution here. THX Lukasz

                  1 Reply Last reply
                  1

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  Online Users
                  L
                  lukas123
                  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