Layout per smartphone 16 luglio 2010
Posted by peterborto in Informatica.Tags: ipad, iphone, layout, smartphone
1 comment so far
Sto creando un pò di layout per cellulari, ma gli script per la detection dei vari smartphone non sembrano funzionare… ho provato i due sottostanti e Mobileesp
ad esempio questo funziona? non mi sembra.. :S
<script type=”text/javascript”>
if (navigator.userAgent.indexOf(‘iPhone’) != -1) {
location.href = ‘http://iphone.sito.it/’;
} ...
questo? bha
<script type=”text/javascript”>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://iphone.sito.it/"; }



