Skip to content

Instantly share code, notes, and snippets.

@sofish
Created July 3, 2012 03:00
Show Gist options
  • Save sofish/3037254 to your computer and use it in GitHub Desktop.
Save sofish/3037254 to your computer and use it in GitHub Desktop.
sea js loader
<script src="http://test.com:8080/static/??sea/sea.js,modules/jquery-1.7.2.min.js"></script>
<script>
seajs.config({
base: 'http://test.com:8080/static/modules'
});
seajs.use('jquery', 'geolocation', function($, geo){
geo(function(coords){
$('#geo').html(coords.latitude + ', ' + coords.longitude);
}, function(err){
alert('error occurred: ' + err);
})
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment