OnClick Mobile Shows but doesnt dissappear

Hi guys, as you can probably tell im very new to coding haha.

Mny thanks to all that helped getting my onmousein and mouseout query i had for desktop view however im having a slight issue with the mobile site ‘onclick’.

I have coded it with onclick and it works on the phone, however once the box appears i cant seem to collapse ot at all? Is there code to allow it to hide like the on mouse out?

Can share images tomorrow when i am back on my laptop

Any help would be appreciated

You will have to display a close button on mobile (hidden on desktop) or create an onClick() event that closes the box if it is already open.

Thanks for the reply bruno, i have tried with the hide feature on mobile but want it so you click off anywhere on the page the container dissapears… as you can see the info vector image is inside the container box, but when i set it to hide when clicking anywhere in the container box, the onclick box flashed for like 2 seconds then went

Please see the code with image

is there anyway i can set a duration?

Yes, there is, but by the image, I could not understand what you need exactly.

You could just simply click again on the dialog box to close it.

export function mobileVectorImage13_click(event) {
    $w("#mobileBox23").hidden ? $w("#mobileBox23").show() : $w("#mobileBox23").hide()
} 

Something like this.