Skip to content

Instantly share code, notes, and snippets.

/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
( function( window, undefined ) {
'use strict';
// helper function
function capitalize( str ) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
// ========================= getStyleProperty by kangax ===============================
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width;height=device-height; user-scalable=no" />
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<title>PhoneGap Reverse Geolocation Lookup</title>
<script type="text/javascript" src="cordova-1.7.0.js"></script>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>