Auto Scroll Down Links - Post ID 261571

User 2410279 Photo


Registered User
13 posts

Hey CC,

I'm currently working on building a new website for a new business. I'm interested in finding out whether or not RSD has to functionality for me to add auto scroll down links within a given page.

If so, what's an intuitive way to approach this?

Bright Regards,
Jacob
User 2088758 Photo


Senior Advisor
3,111 posts

Hi Jacob, if you are referring to page anchors then yes it has the ability to do this. Simply assign an element an ID and reference that ID in your link.
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2410279 Photo


Registered User
13 posts

Hey Steve,

Your instructions did the trick! Are there any nifty additions that I can implement with page anchors, such as having the auto scroll down effect be a gradual scroll down rather than an immediate?
User 2699991 Photo


Registered User
5,305 posts
Online Now

Try adding the following script to the FOOTER of the page you want smooth scrolling

<script>
$(document).ready(function(){

$('a[href^="#"]').on('click', function(event) {
var target = $( $(this).attr('href') );
if( target.length ) {
event.preventDefault();
$('html, body').animate({
scrollTop: target.offset().top
}, 2000);
}
});

});
</script>

This was suggested to me by a kind person on CC forum a while ago, can't remember who I think it was paintbrush but cany be certain
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://mawarputih.coffeecup.com/forms/contact-wayan/
User 2410279 Photo


Registered User
13 posts

Hey Wayanjaya,

That was exactly what I was after! Thank you so much and thank you, Steve; you two rock!

Bright Regards,
Jacob
User 2410279 Photo


Registered User
13 posts

Hey Everyone,

So when I applied the script earlier, I was using RSD version 1.2, and it worked exactly as how I wanted it. Afterwards, I began to sift through the forums for RSD and saw a post or thread on the new version of RSD that was released recently. I decided to look it up and download it to be up to date. I then went back to working on my new website and previewed a few new looks only to find out on the online preview that the previously shared script above no longer worked and that instead of a gradual scroll effect, it reverted back to the immediate page anchor speed (instant).

Has anyone else ran into this and is there a solution?


User 379556 Photo


Registered User
1,583 posts

I think this post may help.

Frank
User 2410279 Photo


Registered User
13 posts

Hey Frank,

I followed the link you provided and found that it leads me to another link, one provided by Scott. This link brings me to a page/library where there're various scripts to choose from. I have no idea which script to choose or if any even will do me any good with regards to my request of having page anchors slowly bring a given user to desired content, rather than being immediate.

User 379556 Photo


Registered User
1,583 posts

In the Head box of the Settings panel one would enter the jQuery snippet from the page referred to by Scott:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>

My knowledge of jQuery at present is minimal, so I will need to leave to others any more detailed information regarding it.

Frank
User 2410279 Photo


Registered User
13 posts

Frank,

Tried it, didn't do the trick. :/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.