Jump to content

Sticky Block

Recommended Posts

  • Replies 5
  • Views 482
  • Created
  • Last Reply

Top Posters In This Topic

You can add a JavaScript code to add position fixed when the top of the element reaches the top of the browser.

 

I tried with position sticky but the scenarios did not work

Link to comment
  • 3 weeks later...
9 minutes ago, dearnaomichan said:

@sorca_marian Do you have a solution using Javascript? Not using Jquery? 

Yes

Link to comment

@sorca_marian ok great because that would be extremely helpful! I am specifically trying to stick the A-Z element on the first section of this page (https://thehighguide.squarespace.com/glossary-a pw: guide) so it sticks at the top over the other section below it. I've make sticky elements within the same section, but never over other sections.

But i've found that Jquery is extremely heavy and weights down the website. Thats why I asked about vanilla javascript. Any advice would be helpful, Thanks!

Edited by dearnaomichan
Link to comment

@dearnaomichan Yes, it is possible wit vanilla JavaScript.

It would take me a few hours to achieve the result and for that amount of hours I request to be hired on Upwork.

Edited by sorca_marian
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...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.