summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2012-12-22 20:18:35 +0100
committerMarcin Łabanowski <marcin@6irc.net>2012-12-22 20:18:35 +0100
commitf0ec60afef7124ee4b153f9b99b5ea9a276ae3c6 (patch)
tree5f5df8e29845619f0186f6fca4ee8bed52e8a6fa /js
parent0812799eb44124d6f07546897918067a34cc84e1 (diff)
mobile-style.js: facilitate styling differently for mobile devices and desktops
Diffstat (limited to 'js')
-rw-r--r--js/mobile-style.js8
1 files changed, 8 insertions, 0 deletions
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");
+ }
+})