Jump to content

Page Jump Anchor Links stopped working

Recommended Posts

Site URL: https://bassoon-dog-tknb.squarespace.com

Hi,

My site p/word is: SandraCB

My site has been working perfectly well until suddenly the anchor links I have set up on the main centred Navigation Menu only take you to the top of the relevant page, not where the anchor link is placed if you are jumping from one Navigation Page anchor link  to different Navigation Page anchor link.  

The code injection I have in the advanced section is:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  $( document ).ready(function() {
    $(".Header-nav-folder-title").eq(0).prop('href', '/aboutus2');
      $(".Header-nav-folder-title").eq(1).prop('href', '/wines2');
      $(".Header-nav-folder-title").eq(2).prop('href', '/sustainability2');
      $(".Header-nav-folder-title").eq(3).prop('href', '/news-and-views2');
    $(".Header-nav-folder-title").eq(4).prop('href', '/visit2');
  });
</script>

The code used on each Navigation Title is for example:

<a href="/aboutus2">About Us</a>

The anchor link on each paragraph is for example:

<p id="the-history">
  </p>

For example:

If you click on Wines and then try to click on History under the About Us menu it takes you only to the top of the About Us page, not the History section where the anchor link is placed.  However if I were on the About Us page and clicked the History link it will take me to the correct anchor link for the History section on that page.

Thanking you in advance!

 

Link to comment
  • Replies 0
  • Views 309
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.


×
×
  • 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.