var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
javascript
http://www.abeautifulsite.net/detecting-mobile-devices-with-javascript/
<iframe width="100%" height="542" src="http://snipet.teknotit.com/index.php?embed=55886445b8dda" type="text/html"></iframe>
Texte seul - Permalink - Snippet public posté le 22/06/2015