1

Basically what I'm trying to do is have 3 css stylesheets for desktop, mobile, and tablet. And I don't care if it is ipad or samsung galaxy tab as long as I know it is a tablet, so that I just apply tablet css to it. Same as iphone or Nexus which I don't care either. I just care about the dimension basically. That would be good if JQuery Mobile could do this.

I know there is lots of code for detecting iphone, ipad, and etc, hope my post still makes sense.

Thanks.

jnj
  • 725
  • 2
  • 11
  • 22

4 Answers4

1

Sounds like using CSS media queries to create a responsive design may be what you need.

ajm
  • 18,564
  • 3
  • 30
  • 34
0

You can have a look at https://stackoverflow.com/a/10364620/450399

He uses css to check screensize and sets a HTML element and reference the css in javascript to determine if it's a "mobile/tablet" device.

You can also have a look at Twitter Bootstrap :) It's really magic!

Community
  • 1
  • 1
Marc Uberstein
  • 12,143
  • 3
  • 41
  • 68
0

I personally use device.js and mobile-detect.js

Ananda
  • 760
  • 11
  • 17
0

You can check great article on SmashingMagazine about media queries and browser detection

If you dig there some more, you will find more useful info.

Ragnarokkr
  • 2,242
  • 2
  • 18
  • 30
Siblja
  • 851
  • 2
  • 12
  • 19