I have a code which works really well in desktop, but not in mobile, i need to solve it. Here is my javascript code:
function O000OOO(e) {
var O0000O0;
if (window.event) {
if (window.event.type == "keypress") {
O00OO00 = -1
}
if (window.event.type == "keypress") {
O00OO00 = window.event.keyCode
}
if (parseInt(O00OO00) > 0) {
O0000O0 = O00OO00
} else {
O0000O0 = window.event.keyCode
}
} else {
if (e.type == "keypress") {
O00O0OO = e.which;
O00OO00 = -1
}
if (e.type == "keypress") {
O00OO00 = e.which
}
if (parseInt(O00OO00) > 0) {
O0000O0 = O00OO00
} else {
if ((parseInt(O00O0OO) > 0) && (e.which < 1)) {
O0000O0 = O00O0OO
} else {
O0000O0 = e.which
}
}
}
return (parseInt(O0000O0))
}
Can anyone tell me, how to make it work in mobile too. When i type in my pc it works, but not in phone, why? How can i fix it?