mobile-style.js: facilitate styling differently for mobile devices and desktops

This commit is contained in:
Marcin Łabanowski 2012-12-22 20:18:35 +01:00
parent 0812799eb4
commit f0ec60afef

8
js/mobile-style.js Normal file
View File

@ -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");
}
})