I'm looking for a global solution which will detect orientation on tablets (not just iPad or Android device but the more the better).
One solution :
device.portrait = function() {
return (window.innerHeight / window.innerWidth) > 1;
};
device.landscape = function() {
return (window.innerHeight / window.innerWidth) < 1;
};
My point of view is that this above is not working well.
I need good solution to load dedicated images in carousel on portrait view and dedicated image on landscape view when orientation change.
Cheers.