Can anyone help me with this.
I would like to detect device such as Iphone, BB, andriod and browser to apply their specific css to make it liquefied or adjust to their resolution.
Does andriod and Iphone have difference resolution issue or css problem when it comes to mobile browser because i plan to use same css for those 2 because i know they are using the same browser safari as default.
Here is an example in javascript:
var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/);
if(isMobile) {
// User-Agent is IPhone, IPod, IPad, Android or BlackBerry
}
To check for a specific User-Agent string you can do:
if(navigator.userAgent.match(/iPhone/)) {
// The User-Agent is iPhone
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With