Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple way to identify iOS user agent in a jQuery if/then statement?

Exactly like it sounds..

Is there some magical and easy way to say:

    if (user agent is iOS) {         if (browserRatio >=1.5) {             $container.css('min-height', '360px');         } else {             $container.css('min-height', '555px');         }      } 
like image 494
technopeasant Avatar asked Sep 14 '11 05:09

technopeasant


1 Answers

Found it.

if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {     if (browserRatio >=1.5) {         $container.css('min-height', '360px');     } else {         $container.css('min-height', '555px');     } } 
like image 53
technopeasant Avatar answered Sep 20 '22 22:09

technopeasant