Last active
December 20, 2015 05:09
-
-
Save avdata99/6076438 to your computer and use it in GitHub Desktop.
Detetctar y cargar version de phonegap correcta segun plataforma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) | |
{isApple=true;} | |
var pgp = document.createElement('script'); | |
pgp.type = 'text/javascript'; | |
if (isApple) | |
{pgp.src = 'js/cordova.ios.js';} | |
else | |
{pgp.src = 'js/cordova.cordova-2.7.0.js';} | |
var spgp = document.getElementsByTagName('script')[0]; | |
spgp.parentNode.insertBefore(pgp, spgp); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment