Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tablet Detection

Okay I got some good advice for Mobile Detection but still having an issue with themed tablets as the icons will be larger for a tablet view then a mobile device. I'm using jQueryMobile as the framework and it does detect the iPad (And I'm sure other tablets are on the way), but how can I detect if it's a tablet or mobile device? would I just go with the screen size?

If that's the case than what's the largest screen size for a mobile device or the smallest screen for a tablet?

is there a better way?

like image 501
Phill Pafford Avatar asked Feb 28 '11 15:02

Phill Pafford


1 Answers

jQuery Mobile adds classes to the body tag which allows you to create a single CSS for all the devices.

See here: http://jquerymobile.com/demos/1.0a3/#docs/api/mediahelpers.html

update

As of beta2 helpers will be deprecated and set for removal. You should take a look at media queries which were used to put these classes in there anyway.

like image 162
naugtur Avatar answered Oct 12 '22 02:10

naugtur