Skip to content

Instantly share code, notes, and snippets.

View aknosis's full-sized avatar
🏔️
Working Remotely

Paul Giberson aknosis

🏔️
Working Remotely
View GitHub Profile
@aknosis
aknosis / gist:997144
Created May 28, 2011 19:32
Execute callback once when a google map is loaded (google maps api)
//Fill in the blanks :)
var map = new google.maps.Map(),
tileListener = google.maps.event.addListener(map,'tilesloaded',fixMyPageOnce);
function fixMyPageOnce(){
//immediately remove the listener (or this thing fires for every tile that gets loaded, which is a lot when you start to pan)
google.maps.event.removeListener(tileListener);
}
@aknosis
aknosis / gist:996028
Created May 27, 2011 19:54
IE 8/9 Bugfix
//in reply to http://twitter.com/#!/scott_gonzalez/status/74191962739183616
//http://bit.ly/jpf1mB
var s = document.getElementsByTagName('select')[0];
s.style.height = "auto";
s.style.height = "";