Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 1

How do I make the scroll down arrow on my homepage clickable and to scroll down to the section below?


Aishwarya

Question

17 answers to this question

Recommended Posts

  • 1
37 minutes ago, Aishwarya said:

Site URL: https://aishwaryabalasankar.com

I have a slide down arrow animation on my homepage. I am looking to enable clicking on the arrow and for it to slide down to the first project (the section below). Also I want to change the slide down arrow color to my logo color. Thanks so much for your help!

Add this to Settings->Advanced->Code Injection

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<style>
	#page section:first-child a.next-section {
      padding-top: 70px;
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      z-index: 2;
      display: inline-block;
      color: #fff;
      font : normal 400 20px/1 'Josefin Sans', sans-serif;
      letter-spacing: .1em;
      text-decoration: none;
      transition: opacity .3s;
    }
    #page section:first-child a.next-section span {
      position: absolute;
      top: 0;
      left: 50%;
      width: 24px;
      height: 24px;
      margin-left: -12px;
      border-left: 1px solid #fff;
      border-bottom: 1px solid #fff;
      -webkit-transform: rotate(-45deg);
      transform: rotate(-45deg);
      -webkit-animation: sdb05 1.5s infinite;
      animation: sdb05 1.5s infinite;
      box-sizing: border-box;
    }
    @-webkit-keyframes sdb05 {
      0% {
        -webkit-transform: rotate(-45deg) translate(0, 0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        -webkit-transform: rotate(-45deg) translate(-20px, 20px);
        opacity: 0;
      }
    }
    @keyframes sdb05 {
      0% {
        transform: rotate(-45deg) translate(0, 0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        transform: rotate(-45deg) translate(-20px, 20px);
        opacity: 0;
      }
    }
</style>
<script>
	$(function() {
      $("#page section:first-child").append('<a href="#" class="next-section"><span></span>Scroll</a>');
      $('a.next-section').on('click', function(e) {
        e.preventDefault();
        $('html, body').animate({ scrollTop: $("#page section:first-child").next().offset().top}, 500, 'linear');
      });
    });
</script>

image.thumb.png.ca1b0ec4b03fb747a04accb482e2ddff.png

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 1

If you use Personal Plan, try this @Aishwarya

1. Add a Code Block (to show arrows)

<div class="bottom">
  <a class="scroll-indicator" href="#tscroll"></a>
</div>
<style>
.bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
  text-align: center;
}

.scroll-indicator {
display: inline-block;
  width: 24px;
  height: 24px;
  margin: 16px auto;
  border-right: 2px solid #FFF;
  border-bottom: 2px solid #FFF;
  border-bottom-right-radius: 2px;
  -webkit-transform: rotate(45deg);
          transform: rotate(45deg);
  -webkit-animation-duration: 2s;
          animation-duration: 2s;
  -webkit-animation-name: fade;
          animation-name: fade;
  -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
          animation-timing-function: linear;
}

@-webkit-keyframes fade {
  0% {
    -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
    opacity: 1;
  }
  75% {
    -webkit-transform: rotate(45deg) translateY(-6px) translateX(-6px);
            transform: rotate(45deg) translateY(-6px) translateX(-6px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fade {
  0% {
    -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
    opacity: 1;
  }
  75% {
    -webkit-transform: rotate(45deg) translateY(-6px) translateX(-6px);
            transform: rotate(45deg) translateY(-6px) translateX(-6px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
</style>

2. In the position where you want the arrow to scroll down, add a Code Block > Paste this code

<span id="tscroll"></span>

 

Link to comment
  • 0
5 minutes ago, bangank36 said:

Add this to Settings->Advanced->Code Injection


<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<style>
	#page section:first-child a.next-section {
      padding-top: 70px;
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      z-index: 2;
      display: inline-block;
      color: #fff;
      font : normal 400 20px/1 'Josefin Sans', sans-serif;
      letter-spacing: .1em;
      text-decoration: none;
      transition: opacity .3s;
    }
    #page section:first-child a.next-section span {
      position: absolute;
      top: 0;
      left: 50%;
      width: 24px;
      height: 24px;
      margin-left: -12px;
      border-left: 1px solid #fff;
      border-bottom: 1px solid #fff;
      -webkit-transform: rotate(-45deg);
      transform: rotate(-45deg);
      -webkit-animation: sdb05 1.5s infinite;
      animation: sdb05 1.5s infinite;
      box-sizing: border-box;
    }
    @-webkit-keyframes sdb05 {
      0% {
        -webkit-transform: rotate(-45deg) translate(0, 0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        -webkit-transform: rotate(-45deg) translate(-20px, 20px);
        opacity: 0;
      }
    }
    @keyframes sdb05 {
      0% {
        transform: rotate(-45deg) translate(0, 0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        transform: rotate(-45deg) translate(-20px, 20px);
        opacity: 0;
      }
    }
</style>
<script>
	$(function() {
      $("#page section:first-child").append('<a href="#" class="next-section"><span></span>Scroll</a>');
      $('a.next-section').on('click', function(e) {
        e.preventDefault();
        $('html, body').animate({ scrollTop: $("#page section:first-child").next().offset().top}, 500, 'linear');
      });
    });
</script>

image.thumb.png.ca1b0ec4b03fb747a04accb482e2ddff.png

Thanks a lot for the response! Looks like my plan doesn't support code injection feature 😞 Is there an alternative?

Link to comment
  • 0
3 minutes ago, Aishwarya said:

Thanks a lot for the response! Looks like my plan doesn't support code injection feature 😞 Is there an alternative?

No sorry

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
5 minutes ago, Aishwarya said:

I was wondering if there is an option to make it a simple clickable slide down arrow which slides down to the next section without animation (by inserting a code block)

It needs javascript and js blocked in basic plan

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
On 1/15/2021 at 2:46 AM, benxmacdonald said:

This code is great, but is there a way to have the arrow be aligned with the bottom of a section? @tuanphan

Add to Design > CUstom CSS

body.homepage #page section:first-child .content-wrapper {
    padding-bottom: 0 !important;
}

 

Link to comment
  • 0
On 1/17/2021 at 10:09 AM, tuanphan said:

Add to Design > CUstom CSS



body.homepage #page section:first-child .content-wrapper {
    padding-bottom: 0 !important;
}

 

This isn't working for me when I copy and paste it into Custom CSS even if I change first-child to second-child depending on the section where I want the down arrow to be. Is there something else I need to change if I want to use the arrow to be in another section as well?

On 12/21/2020 at 9:42 PM, tuanphan said:

If you use Personal Plan, try this @Aishwarya

1. Add a Code Block (to show arrows)



<div class="bottom">
  <a class="scroll-indicator" href="#tscroll"></a>
</div>
<style>
.bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
  text-align: center;
}

.scroll-indicator {
display: inline-block;
  width: 24px;
  height: 24px;
  margin: 16px auto;
  border-right: 2px solid #FFF;
  border-bottom: 2px solid #FFF;
  border-bottom-right-radius: 2px;
  -webkit-transform: rotate(45deg);
          transform: rotate(45deg);
  -webkit-animation-duration: 2s;
          animation-duration: 2s;
  -webkit-animation-name: fade;
          animation-name: fade;
  -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
          animation-timing-function: linear;
}

@-webkit-keyframes fade {
  0% {
    -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
    opacity: 1;
  }
  75% {
    -webkit-transform: rotate(45deg) translateY(-6px) translateX(-6px);
            transform: rotate(45deg) translateY(-6px) translateX(-6px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fade {
  0% {
    -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
    opacity: 1;
  }
  75% {
    -webkit-transform: rotate(45deg) translateY(-6px) translateX(-6px);
            transform: rotate(45deg) translateY(-6px) translateX(-6px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
</style>

2. In the position where you want the arrow to scroll down, add a Code Block > Paste this code



<span id="tscroll"></span>

 

I would prefer not to use the anchor point. How can I remove the hyperlink that's attached to the down arrow?

Thanks so much for the help!

Edited by AllanYung
Link to comment
  • 0
On 12/19/2020 at 5:32 AM, bangank36 said:

Add this to Settings->Advanced->Code Injection


<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<style>
	#page section:first-child a.next-section {
      padding-top: 70px;
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      z-index: 2;
      display: inline-block;
      color: #fff;
      font : normal 400 20px/1 'Josefin Sans', sans-serif;
      letter-spacing: .1em;
      text-decoration: none;
      transition: opacity .3s;
    }
    #page section:first-child a.next-section span {
      position: absolute;
      top: 0;
      left: 50%;
      width: 24px;
      height: 24px;
      margin-left: -12px;
      border-left: 1px solid #fff;
      border-bottom: 1px solid #fff;
      -webkit-transform: rotate(-45deg);
      transform: rotate(-45deg);
      -webkit-animation: sdb05 1.5s infinite;
      animation: sdb05 1.5s infinite;
      box-sizing: border-box;
    }
    @-webkit-keyframes sdb05 {
      0% {
        -webkit-transform: rotate(-45deg) translate(0, 0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        -webkit-transform: rotate(-45deg) translate(-20px, 20px);
        opacity: 0;
      }
    }
    @keyframes sdb05 {
      0% {
        transform: rotate(-45deg) translate(0, 0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        transform: rotate(-45deg) translate(-20px, 20px);
        opacity: 0;
      }
    }
</style>
<script>
	$(function() {
      $("#page section:first-child").append('<a href="#" class="next-section"><span></span>Scroll</a>');
      $('a.next-section').on('click', function(e) {
        e.preventDefault();
        $('html, body').animate({ scrollTop: $("#page section:first-child").next().offset().top}, 500, 'linear');
      });
    });
</script>

image.thumb.png.ca1b0ec4b03fb747a04accb482e2ddff.png

I know this is an older post, but is there a way to hide this for a mobile site? the bouncing arrow doesn't look good on mobile

Link to comment
  • 0
3 hours ago, Atara said:

I know this is an older post, but is there a way to hide this for a mobile site? the bouncing arrow doesn't look good on mobile

Use css for it

@media only screen and (max-width: 640px) {
  .next-section {
  	display: none !important;
  }

}

 

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
2 minutes ago, abacostudios said:

@bangank36is there any way to cancel that "Scroll" text under the scroll down arrow?

You can find it in the js part here

image.png.e3e9d305803778f069993547f98543bf.png

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
19 minutes ago, abacostudios said:

Ok so i can simply delete that scroll text right?

 

yes

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...