Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.javascript > #7996

Re: Templates opzionali

From Giorgio <giorgio@is.invalid>
Newsgroups it.lavoro.professioni.webmaster, it.comp.lang.javascript
Subject Re: Templates opzionali
Date 2016-02-08 11:07 +0100
Organization Netfront http://www.netfront.net/
Message-ID <n99pcf$3e6$1@adenine.netfront.net> (permalink)
References <n94tr4$5hi$1@gioia.aioe.org> <n95f4j$1p6g$1@newsreader2.mclink.it> <n95ijg$18lh$1@gioia.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


eurofilattico ha spiegato il 06/02/2016 :
>
> Di qui il mio quesito su come impostare un comando che permetta di 
> riconoscere il dispositivo, ma non switchando poi il CSS, ma il template.
>

Stai cercando qualcosa come questo ?
<script type="text/javascript">
	var mql = window.matchMedia("only screen and (max-width: 600px)");
	if(mql.matches) {
        //  window.location='/mobile/index.php';
        //  codice tuo.
        //   codice tuo
    }
</script>

Ciao

-- 
Giorgio

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to it.comp.lang.javascript | Previous | NextNext in thread | Find similar


Thread

Re: Templates opzionali Giorgio <giorgio@is.invalid> - 2016-02-08 11:07 +0100
  Re: Templates opzionali eurofilattico <eurofilattico@eurofilattico123.org.invalid> - 2016-02-08 21:48 +0100
    Re: Templates opzionali Paolo De Dionigi <PaoloDeDionigi@gmail.com> - 2016-02-09 10:23 +0100
      Re: Templates opzionali eurofilattico <eurofilattico@eurofilattico123.org.invalid> - 2016-02-11 21:37 +0100

csiph-web