I want to load google maps dynamically so I only load them when needed but I keep getting the error google is not defined here is my code
$(document).ready(function(){
if($('.geotags').length > 0){
$("head").append('<script type="text/javascript" src="http://www.google.com/jsapi?key=keytogooglemapsapi"></script>');
google.load("maps", "2.x", {"other_params":"sensor=false",'callback':build_gmaps});
}
}
EDIT add more code to show where I would like to do this