M m.pittini Utente Attivo 26 Feb 2009 232 6 0 31 Lug 2011 #1 Esiste una funzione o un metodo per verificare se il dispositivo che sta visualizzando la pagina è di tipo TouchScreen (come ad esempio uno smartphone o un tablet)?
Esiste una funzione o un metodo per verificare se il dispositivo che sta visualizzando la pagina è di tipo TouchScreen (come ad esempio uno smartphone o un tablet)?
maxbossi Amministratore Membro dello Staff ADMIN MOD 25 Feb 2003 2.024 43 48 www.ikiweb.it 31 Lug 2011 #2 Questa funzione che verifica se il device è touch screen: Codice: function isTouchDevice(){ try{ document.createEvent("TouchEvent"); return true; }catch(e){ return false; } } Ciao
Questa funzione che verifica se il device è touch screen: Codice: function isTouchDevice(){ try{ document.createEvent("TouchEvent"); return true; }catch(e){ return false; } } Ciao