Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
Created June 9, 2011 10:23
Show Gist options
  • Save feedhenry-gists/1016485 to your computer and use it in GitHub Desktop.
Save feedhenry-gists/1016485 to your computer and use it in GitHub Desktop.
Mapping Example jQuery Mobile Version Map.show
// Bind the callback for when the map page is shown
$("#map").live( "pageshow", function(event, ui){
//Let the maps_div fill the full area available
var mpageHeight = $("#map").height();
var mHeaderHeight = $("#map .ui-header").height();
var mapH = mpageHeight - mHeaderHeight
$("#maps_div").css("height", mapH + "px");
$("#maps_div").css("width", "100%");
// Show the map
map.show();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment