Navigate to the last scroll position when coming back to the homepage
-
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 -
Any clue @mariusjopen ? It's for Simon Koy's website http://simonkoy.de
-
Hey Johan!
Oh, so normally this works, but only on pages where theres no project thumbnail overview grid.
I need to improve this!
-
Hey Johan!
Oh, so normally this works, but only on pages where theres no project thumbnail overview grid.
I need to improve this!
@arminunruh Thanks a lot for your answer. Is there a trick I should use until you implement this functionality?
-
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.
-
Hi @Johan
have a look how to deal with Javascript here:
http://laytheme.com/documentation.html#custom-javascriptI hope that will work out for you.
All the best!
Marius
-
Hi @Johan
have a look how to deal with Javascript here:
http://laytheme.com/documentation.html#custom-javascriptI hope that will work out for you.
All the best!
Marius
@mariusjopen Thanks a lot. I will find a way !
-
Hi Johann,
did you made it work .. searching for a solution here. THX Lukasz
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