Jump to content

Clickable Drop Down Menu Button

Recommended Posts

  • Replies 5
  • Views 1.7k
  • Created
  • Last Reply

I have the code to make it clickable, but be aware that it may not work well for mobile viewers. They don't have the ability to open the folder on hover, they have to click the folder to open it, and if this is added they will go straight to your blog not one of the categories in the folder. 

Add to Home > Settings > Advanced > Code Injection > Footer

 

Add to Home > Settings > Advanced > Code Injection > Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() { 
	$('.header-nav-folder-title[href="/blog-1"]').click(function() {
		window.location = "/blog";
	});
});
</script>
Link to comment
4 minutes ago, derricksrandomviews said:

I have the code to make it clickable, but be aware that it may not work well for mobile viewers. They don't have the ability to open the folder on hover, they have to click the folder to open it, and if this is added they will go straight to your blog not one of the categories in the folder. 

Add to Home > Settings > Advanced > Code Injection > Footer



 

Add to Home > Settings > Advanced > Code Injection > Footer


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() { 
	$('.header-nav-folder-title[href="/blog-1"]').click(function() {
		window.location = "/blog";
	});
});
</script>

Wow, thank you! It says that is only a feature for Business and Commerce plans which I do not have. Is there a way around that? 

Link to comment

Not with this code, and I am not aware of any that works in custom css. 

Here is what  I suggest, name the folder Wellness or something similar and add a link to your blog in the folder. I did something similar with my site where I posted photography lessons on my blog and put them in a folder:

https://myrandomviews.com/views-images

My folder title is not clickable either, I choose to leave it that way. 

Link to comment
13 minutes ago, derricksrandomviews said:

Not with this code, and I am not aware of any that works in custom css. 

Here is what  I suggest, name the folder Wellness or something similar and add a link to your blog in the folder. I did something similar with my site where I posted photography lessons on my blog and put them in a folder:

https://myrandomviews.com/views-images

My folder title is not clickable either, I choose to leave it that way. 

That's a great idea. Thank you so much! 

Link to comment

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.