Skip to content

Instantly share code, notes, and snippets.

@csytan
Created May 30, 2011 23:54
Show Gist options
  • Save csytan/999645 to your computer and use it in GitHub Desktop.
Save csytan/999645 to your computer and use it in GitHub Desktop.
(function($){ // Module pattern, means vars defined here will not leak outside
// Global vars. Some people use CAPS for them -- it's your personal preference
var MAP = null;
var INFOWINDOW = null;
...
function setLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(gomala.setMap);
} else {
gomala.setMap();
}
}
function displayResults(response){
clearMarkers();
... etc.
}
$(document).ready(function(){
setLocation();
setMap();
$(function() {
$("#search_field").suggest({type:'/travel/tourist_attraction',
type_strict: 'all'});
});
$("#search_field").suggest().bind("fb-select", gomala, gomala.search);
$("#trips ol").sortable();
$("a.poi").live('click', function(){
$('#trips ol').append('<li><a href="">' + $(this).text() + '</a></li>');
return false;
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment