Shopify themes, liquid, logos, and UX
Hello, I use a code CSS that made my banner Clickable on Desktop but do not work on Mobile, how Can I make banner clickable on mobile?Craft Theme
Hi,
Identify Your Banner Element (example - #banner)
Edit Code-->at Add JavaScript
document.addEventListener('DOMContentLoaded', function() {
var banner = document.getElementById('banner');
if (banner) {
banner.addEventListener('click', function() {
window.location.href = 'YOUR_TARGET_URL'; // Replace 'YOUR_TARGET_URL' with the URL you want to redirect users to.
});
}
});
Save and Test
Hello @Ana281
Hope you are doing well.
Would you like to share your store URL Please ( with password if password protected ) so I can provide you some precise solution for this one
Thank you and looking forward to hearing from you.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025