문제

I would like to know, what is the best way to detect tablets and smartphone at the moment?

Plugin, user agent detection, touch screen detection etc.

Thanks

도움이 되었습니까?

해결책

Look at the top rated answer at this url:

What is the best way to detect a mobile device in jQuery?

Current methods from that thread:

var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/); 

Jquery:

$.browser.device = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top