From f0ec60afef7124ee4b153f9b99b5ea9a276ae3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=81abanowski?= Date: Sat, 22 Dec 2012 20:18:35 +0100 Subject: [PATCH] mobile-style.js: facilitate styling differently for mobile devices and desktops --- js/mobile-style.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 js/mobile-style.js diff --git a/js/mobile-style.js b/js/mobile-style.js new file mode 100644 index 00000000..4c50d0e0 --- /dev/null +++ b/js/mobile-style.js @@ -0,0 +1,8 @@ +onready(function(){ + if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook/i)) { + $('html').addClass("mobile-style"); + } + else { + $('html').addClass("desktop-style"); + } +})