Skip to content

Instantly share code, notes, and snippets.

@avdata99
Last active December 20, 2015 05:09
Show Gist options
  • Save avdata99/6076438 to your computer and use it in GitHub Desktop.
Save avdata99/6076438 to your computer and use it in GitHub Desktop.
Detetctar y cargar version de phonegap correcta segun plataforma
<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