cara membuat template tetap pada tampilan Hp

Sekarang ini blogspot udah bisa ngedetek user yang pake mobile phone / hp buat akses blog kita. Kita juga tinggal setting buat nampilin mobile template buat user yang pake hp tersebut.

Sayangnya, fasilitas blogspot buat ngedetek user yang pake mobile phone itu cuma bisa ngedetek user yang pake browser dengan engine Webkit. Jadi kalau user yang berkunjung ke blog ente pake browser non Webkit, maka blog ente tetep nampilin template reguler yang buat desktop.

Cara ngatasinnya bisa pake javascript. Tenang gan, simpel kok scriptnya. Ini dia.




HTML Code:
<b:if cond='data:blog.isMobile'>
<b:else/>
[removed]
//<![CDATA[
if(screen.width<1024){[removed]=document.URL+"?m=1"}
//]]>

[removed]
</b:if>


jangan lupa ganti [removed] pertama dengan tag pembuka javascript dan [removed] kedua dengan tag penutup javascript. sepertinya di kaskus ga boleh nulis tag tersebut 

Agan tinggal copas script di atas, terus paste sebelum tag
HTML Code:
</head>


Tenang gan, kaga ada jebakan di script itu.
Cara kerja script di atas cuma ngedetek width dari device yang dipake user buat akses blog agan. kalau width nya kurang dari 1024 pixel, langsung diredirect ke mobile template, karena diasumsikan itu adalah mobile phone / hp




-->


6 Responses to "cara membuat template tetap pada tampilan Hp"

  1. I'm really inspired together with your writing skills as well as with the layout in your weblog. Is this a paid topic or did you customize it your self? Anyway keep up the nice high quality writing, it is uncommon to peer a nice weblog like this one today..

    My web page; http://www.youtube.com/watch?v=zdjjRmyXsvY

    BalasHapus
  2. My partner and I absolutely love your blog and find many of
    your post's to be what precisely I'm looking for. Would
    you offer guest writers to write content for you?

    I wouldn't mind writing a post or elaborating on many of the subjects you write regarding here. Again, awesome web site!

    Stop by my homepage ... how to make extra Money from home

    BalasHapus
  3. hi!,I really like your writing very much! share we keep in touch extra approximately your post on AOL?
    I need an expert on this space to solve my
    problem. May be that is you! Taking a look ahead to
    look you.

    my web page: オークリー アウトレット

    BalasHapus
  4. I’m not that much of a online reader to be honest
    but your sites really nice, keep it up! I'll go ahead and bookmark your site to come back down the road. Cheers

    My web page ... http://www.youtube.com/watch?v=opdUxdbSOh0

    BalasHapus
  5. mantap gan artikelnya..
    btw, templatenya kayak template gw yg dulu..
    tapi skrg udah gw ganti.. :)

    BalasHapus
  6. What's up too every single one, it's in fact a fastidious for me to
    visit this website, it consists of valuable Information.

    my weblog home services website

    BalasHapus