Jump to content

saj_3472

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    saj_3472 got a reaction from Beyondspace in Auto scroll to a section on the page after first landing   
    This works! Thank you!
  2. Like
    saj_3472 reacted to Beyondspace in Auto scroll to a section on the page after first landing   
    Try settings hash url only
    location.hash = "#scroll-here"
  3. Like
    saj_3472 got a reaction from Beyondspace in Auto scroll to a section on the page after first landing   
    Site URL: https://www.smoredate.com/
    Once the web page loads, I want to automatically jump to a section on the home page without using anchor links or having to press a button/click a link. I created a redirect using div as below:
    <div id="scroll-here">
    </div> 
    It takes you to the Home page on the navigation bar with the anchor tag in the url slug--> /home#scroll-here
    Then I set up a script in the landing page where I want the auto scroll to work:
    <script>
    var url= "https://www.smoredate.com/home#scroll-here";
         window.location = url;
    </script>
    The code works on the front end but Squarespace dashboard never stops loading, I'm assuming it's jumping between the two home pages: the one on the navigation bar and the landing home page! Where did I go wrong?! :(
×
×
  • 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.