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

Nav Folder link - mobile

Question

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

Hi Guys,

the site password is : SandraCB

I am using this jsquery to enable the site to have nav folder links:

<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>

Then this code for the links:

<a href="/aboutus2">Our Story</a>

As you will see the Top folder nav links take you to a page connected to that title i.e Our Story - however on a mobile when the burger menu is in use when you click on 'Our Story' it does not show the 'Our Story' page it just opens the menu to ask you to click on the other pages in that folder?

Thank you!

 

@tuanphan I think maybe you may know something about this, as I have seen you talk about it on another post?

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

Mobile menu uses different class

Desktop

Quote

.Header-nav-folder-title

Mobile

Quote

.Mobile-overlay-nav-item--folder

or

Quote

span.Mobile-overlay-nav-item--folder-label

 


You can send your question to my email to get faster answer.

How to Setup Password & Share URL  Squarespace Customer Care

OFF to next Tuesday. Please send to email if you have urgently problem.

Share this post


Link to post
  • 0
On 6/30/2020 at 5:06 PM, tuanphan said:

@tuanphan hi, thank you for this information, but I am not sure what to change or add to make this work?  Do I have to add all the same jquery but substitute the .Header-nav-folder-title for span.Mobile-overlay-nav-item--folder-label?

 

 

Share this post


Link to post
  • 0
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  $( document ).ready(function() {
    // for desktop
    $(".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');
    // for mobile
    $(".Mobile-overlay-nav-item--folder").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>

replace similar...


You can send your question to my email to get faster answer.

How to Setup Password & Share URL  Squarespace Customer Care

OFF to next Tuesday. Please send to email if you have urgently problem.

Share this post


Link to post
  • 0

@tuanphan Hi, thank you for the new code, but it does not seem to have changed anything?  When I check the site out on my mobile and I click on any of the nav titles it still does not link to the actual main page, it just opens up the menu as before.  So we are sill missing the main landing page for each header.

i.e. on a desktop if you click any of the nav titles like 'Our Story' or 'Sustainability' it takes you to a main landing page.  If you do the same on a mobile it still only opens up a menu to all the other links, it does not take you to the main page as it does on a desktop.

 

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...