Shopify themes, liquid, logos, and UX
Hi, it came to my attention that the header items of dropdowns on mobile - so each menu item that has a dropdown only opens the menu bellow although I also connected a link to it in the navigation. Can anyone help make the dropdown headers links work as well for mobile ? (so that the link will work and the dropdown as well- like on desktop
https://www.ildetailing.com/
Hi
I have checked and It's working fine in mobile.
it will just open and close the submenu, but the link of that tab itself won't work
Hi @Daniel19901, The problem is that there is a black block that is lying on top so the bottom part will be covered.
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
@BSSCommerce-HDL hi, you misunderstood my my friend, I meant these links : I can only open and close the submeanu with them (for this I have the +- icons), but when I click on the text side it should take me to the link of that main tab, not continue to open and close the subtabs like the +- should do
Hi @Daniel19901,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body> tag:
<script>
window.onload = () => {
let txt_has_submenus = document.querySelectorAll('#menu_mobile summary .hdt-block.hdt-line-clamp');
if(txt_has_submenus.length > 0) {
txt_has_submenus.forEach(txt => {
let link_url_summary = txt.closest('summary').getAttribute('data-url');
txt.addEventListener('click', () => {
window.location.href = link_url_summary;
})
})
}
}
</script>
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
@Daniel19901, Can you collaborate with me? I will check if it can be solved?
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Hi
I have noticed that no link added on the main menu like the submenu, Kindly add the link on the main for the redirection.
You need to customize in the code for this
For the reference check the screenshot
Thanks
Or you can try this code
$('.hdt-has-children.hdt-relative span.hdt-menu-link-text.hdt-block').click(function(){
var page_url = $(this).parent().parent().attr('data-url');
console.log(page_url);
window.location.href = page_url;
})
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024