Post pobrano z: Detect Platform, OS & Orientation – Device.js
Sometimes, we need to take environment-specific actions while working on web projects.
Device.js is a tiny JavaScript library that simplifies writing conditional CSS or JavaScript that is based on the platform, operating system or browser.
The library detects them and adds specific classes to the <html> element, just like <html lang="en" class="android tablet landscape">.
But that’s not all. Device.js has JavaScript methods to detect them too. And there is support for all the major operating systems + browsers.Advertisements:
ioDeck, a self-hosted and awesome PHP form generator.
Professional XHTML Admin Template ($15 Discount With The Code: WRD.)
SSLmatic – Cheap SSL Certificates (from $19.99/year)
