Reputation: 1
I'm developing an application for Ipad. So I need to change the image rendering depending upon the devide wheteher it is ipad or ipad-retina . So can anybody tell me how to detect the difference between ipad and ipad-retina? Thanx!!!!!!!
Upvotes: 0
Views: 296
Reputation: 20209
var retina = (window.retina || window.devicePixelRatio > 1);
Resource: http://hjzhao.blogspot.in/2012/07/detect-retina-display-using-javascript.html
Also use Modernizr
https://github.com/benlister/utilities/tree/master/Modernizr%20Retina%20:%20HiDPI%20test
Upvotes: 0
Reputation: 219938
var isRetina = window.devicePixelRatio > 1;
Check this out: Detect retina displays with javascript.
Upvotes: 1