-1
Is there any way to detect the "back" click? More necessarily from mobile devices (Android is enough).
I would like, in my web app, the back button can call certain functions, in this case close popups. Do you have any idea?
-1
Is there any way to detect the "back" click? More necessarily from mobile devices (Android is enough).
I would like, in my web app, the back button can call certain functions, in this case close popups. Do you have any idea?
0
You can try using the function:
document.addEventListener("backbutton", onBack, false)
function onBack(){ /* faz algo ao clicar no botão voltar */ }
Browser other questions tagged javascript jquery
You are not signed in. Login or sign up in order to post.
didn’t work :( you already tested it?
– Thiago Soubra
worse, that yes I use it in my app, some error?
– Will
if you manage to post the code part, tbm would help a little
– Will
I found a way!! but I’m not able to duplicate it to use more than one popup. I’ll put her link in jsfiddle, if you want to try it would be great!
– Thiago Soubra
and on your question, no mistake, just exit the web app without calling the function
– Thiago Soubra
https://jsfiddle.net/Limitlessisa/axt1Lqoz/
– Thiago Soubra
all I need is that, like, the "share" button can be duplicated and each open a different popup and close their respective ones. when I tried this one of them always ends up losing the effect and I don’t understand why
– Thiago Soubra
Hello I made a fast way here, https://jsfiddle.net/3e5dgo0j/1/ see if that’s it, only missing when you click a exit, and you can slow down the effect tbm, I didn’t understand if that’s what you wanted.
– Will