How can I make a mobile banner clickable in Craft Theme?

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.