ScottoCat
-
Posts
21 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by ScottoCat
-
-
Hello, Yes, thank you, Here is the link to that page.
-
Hello, If you go to my site head over to Newer Albums. The pagination arrows are only at the bottom. I would like to have them at the top as well. Does anyone know code that I could add to the post pages settings header. I would like it to be just under the search bar. The second picture shows the current pagination, which I would like to keep.
-
I am having a similar issue except it goes to the top of the page. The JS i had in the code injector stopped working after working for 4 + years. Does anyone now how to fix this. Here is the current code that isn't working:
<script type="text/javascript">
function refreshPage () {
var page_y = document.getElementsByTagName("body")[0].scrollTop;
window.location.href = window.location.href.split('?')[0] + '?page_y=' + page_y;
}
window.onload = function () {
setTimeout(refreshPage, 3600000);
if ( window.location.href.indexOf('page_y') != -1 ) {
var match = window.location.href.split('?')[1].split("&")[0].split("=");
document.getElementsByTagName("body")[0].scrollTop = match[1];
}
}
</script> -
I had to upgrade my plan to be able to unlock the code injector. Now I just need code that will do what it did before. Here is the code now that I can copy/paste:
<script type="text/javascript">
function refreshPage () {
var page_y = document.getElementsByTagName("body")[0].scrollTop;
window.location.href = window.location.href.split('?')[0] + '?page_y=' + page_y;
}
window.onload = function () {
setTimeout(refreshPage, 3600000);
if ( window.location.href.indexOf('page_y') != -1 ) {
var match = window.location.href.split('?')[1].split("&")[0].split("=");
document.getElementsByTagName("body")[0].scrollTop = match[1];
}
}
</script> -
Does that script need to be altered or do I add another. I went to developer section and was not able to copy where the JS was added in the footer code injection part. It looks like i have to upgrade to be able to unlock that section
-
it is public. Anyone can go to it. Are you saying that you would need access to the backend?
-
Hey Creedon, thanks. Here is a page: https://top1000albums.com/300s If you scroll down to the middle or lower click on any album, then hit the back arrow and you will see what I mean. I'll look into getting the site wide password
-
Thanks for the response Simon, What i had set up was script that would allow you to return to your place on these busy pages you were after going to an album (post). Soon i will have 1100 pages on the site. This script was working up until today
-
-
Hello, I have had code that has worked for years where when you hit the back arrow you return to where you were on the scroll. It's important with my site, especially on mobile. The back arrow is returning you to the top of the page rather than where you left off. I remember i got code to insert. I am also not sure why it suddenly stopped working.
-
Never-mind. I figured it out using Spacers
-
Hello, I am trying to make bullet list 2 columns on desktop and single file left on mobile. I was able to do it by dragging but it looked bad and was out of order on mobile
-
-
On 6/18/2020 at 11:08 AM, colin.simmons said:
Hey friends,
Here's a snippet of code that I use to save the scroll position. I use it when a user has navigated away from a long index page and I want them to return to the same place.
Note, for an index, you must add it in the code injection for the INDEX, not the page section.
<script type="text/javascript"> function refreshPage () { var page_y = document.getElementsByTagName("body")[0].scrollTop; window.location.href = window.location.href.split('?')[0] + '?page_y=' + page_y; } window.onload = function () { setTimeout(refreshPage, 35000); if ( window.location.href.indexOf('page_y') != -1 ) { var match = window.location.href.split('?')[1].split("&")[0].split("="); document.getElementsByTagName("body")[0].scrollTop = match[1]; } } </script>
Let me know if this helps!
This one worked great. I land at the top of each post and don't loose the spot on scrolls. This was especially important on smartphones. One question; can Ajax be enabled with this script. I am afraid to try it.
-
It worked except when you click on a thumbnail it drops you off at the bottom of the posts. Any way around this? Also it seemed to work in placed in the Header and Footer. Is there one that is better?
-
My site has a lot of scrolling. The template Avenue returned you to where you were on the page. I switched to Brine template to have more control on the post. But I found out this annoying thing where back arrows bring you to the top of the page. I can imaging this will get old to the users experience. I am about to inject the code above but am uncertain as to which section. Also i am nervous that I will break my site. If something bad happens can I simply go in and remove it?
-
On 12/25/2020 at 8:01 PM, Helen_Phan said:
Try this code. It works for me.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { if (localStorage.getItem("my_app_name_here-quote-scroll") != null) { $(window).scrollTop(localStorage.getItem("my_app_name_here-quote-scroll")); } $(window).on("scroll", function() { localStorage.setItem("my_app_name_here-quote-scroll", $(window).scrollTop()); }); }); </script>
Helen, Where do I drop this code in Header, Footer or Order Conformation sections
Return to Place on Scroll After Back Arrow
in Customize with code
Posted
Hello, Once again script has stopped working on my site. It is one of the most important features. I guess every time they do an update? Because there is a lot of scrolling with many individual posts I need the user to return to where they were on the posts page when they click the back arrow. I found script that works BUT only after the 2nd click back. I need it to happen every time. Is there a way to alter this or does anyone have script that would work.?
Thanks!
Here It is:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
if (window.performance && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) {
if (localStorage.getItem("my_app_name_here-quote-scroll") != null) {
$(window).scrollTop(localStorage.getItem("my_app_name_here-quote-scroll"));
}
} else {
$(window).scrollTop();
}
window.addEventListener('beforeunload', function (e) {
if (window.performance && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) {
localStorage.setItem("my_app_name_here-quote-scroll", $(window).scrollTop());
}
});
</script>