Share feedback, ideas and get community help

F
M
a
g
E

Show Bubble only on Desktop

Has anyone try to only show the bubble on desktop and hide it on mobile devices? I was thinking it may have to be done by writing a Custom script. Please share if you have a better idea. Thanks
1
B
F
y
12 comments
Yes, that should be doable with CSS even. What’s your website builder?
this is a simple version of it like since most mobile screens are 768px
function isMobile() {
// Media query to check for specific screen width range commonly associated with mobiles
return window.matchMedia("(max-width: 768px)").matches;
}

// Usage example
if (isMobile()) {
console.log("Mobile device detected");
// Option to or not, load mobile-specific content or styles here
} else {
console.log("Laptop or desktop device detected");
// Option to, load desktop-specific content or styles here
}
it basically checks the screen width range
its not optimal for different screen but that you will have to tweak with
thanks @Baptiste . we use wordpress
appreciate the reply. i am aware about using JS to solve the initial problem of hiding the bubble altogether on mobile. I was kinda interested to know if there's more 'native' way to handle it via Typebots
No native way to do that 🙏
Why you dont put typebot script inside blocks/container on wordpress then use responsive option to enable it on desktop only?
What builder are you using on wordpress?
Yes that's what we're planning of doing
Add a reply
Sign up and join the conversation on Discord
Join