Created
May 30, 2011 23:54
-
-
Save csytan/999645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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