I'm about to launch my website and have one hang up that I just noticed.
I really wanted to have drop down menus as my store is a large part of my website. But I didn't like how I couldn't click on the folder button itself. Whenever I clicked on the folder button nothing would happen.
So I used some custom CSS to make it so that clicking on the folder button itself lead to a link. That way I didn't have to have the word "Shop" appearing under a folder that was also called "Shop".
But I realised that this doesn't work on mobile as clicking on a drop down menu opens up the folder and won't show the link that the button itself links to.
Is there any way to make it so the page the folder button links to appears in the drop down menu that shows up on mobile? Without having it show up on desktop as well?
For reference, here's the CSS I'm currently using (it's in advanced, code injection, header:
<script>
(function()
{window.addEventListener("load", function () {
var tours = document.querySelector('[href="/shop-1"]');
tours.addEventListener("click", function () {
window.location = "/shop/collections";
});
})}
)();
</script>
<script>
(function()
{window.addEventListener("load", function () {
var tours = document.querySelector('[href="/support-the-community-1"]');
tours.addEventListener("click", function () {
window.location = "/support-the-community";
});
})}
)();
</script>
<script>
(function()
{window.addEventListener("load", function () {
var tours = document.querySelector('[href="/about-1"]');
tours.addEventListener("click", function () {
window.location = "/about";
});
})}
)();
</script>
Here's the password to get into the site: hobbes94!@
Question
HobbesSakuga 0
Site URL: https://wolf-puma-68z2.squarespace.com/
Hi,
I'm about to launch my website and have one hang up that I just noticed.
I really wanted to have drop down menus as my store is a large part of my website. But I didn't like how I couldn't click on the folder button itself. Whenever I clicked on the folder button nothing would happen.
So I used some custom CSS to make it so that clicking on the folder button itself lead to a link. That way I didn't have to have the word "Shop" appearing under a folder that was also called "Shop".
But I realised that this doesn't work on mobile as clicking on a drop down menu opens up the folder and won't show the link that the button itself links to.
Is there any way to make it so the page the folder button links to appears in the drop down menu that shows up on mobile? Without having it show up on desktop as well?
For reference, here's the CSS I'm currently using (it's in advanced, code injection, header:
<script>
(function()
{window.addEventListener("load", function () {
var tours = document.querySelector('[href="/shop-1"]');
tours.addEventListener("click", function () {
window.location = "/shop/collections";
});
})}
)();
</script>
<script>
(function()
{window.addEventListener("load", function () {
var tours = document.querySelector('[href="/support-the-community-1"]');
tours.addEventListener("click", function () {
window.location = "/support-the-community";
});
})}
)();
</script>
<script>
(function()
{window.addEventListener("load", function () {
var tours = document.querySelector('[href="/about-1"]');
tours.addEventListener("click", function () {
window.location = "/about";
});
})}
)();
</script>
Here's the password to get into the site: hobbes94!@
Thanks!
Edited by HobbesSakugaadding site password
Link to post
Top Posters For This Question
3
2
1
Popular Days
Mar 2
2
Mar 6
1
Jan 26
1
Feb 2
1
Top Posters For This Question
tuanphan 3 posts
lbsunfire 2 posts
HobbesSakuga 1 post
Popular Days
Mar 2 2021
2 posts
Mar 6 2021
1 post
Jan 26 2021
1 post
Feb 2 2021
1 post
Popular Posts
tuanphan
Edit this code <script> $(document).ready(function() { $('.header-nav-folder-title[href="/who-we-are"]').click(function() { window.location = "/origin-story"; }); }); </script>
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment