Jquery与GMAPSAPI的Javascript冲突?我该如何解决?
有人能回答为什么jquery在下面不起作用吗 我在谷歌地图上使用的javascript和jquery之间是否存在某种冲突?我如何才能得到它,使它们正常工作?我很确定我已经引用了html中的所有内容Jquery与GMAPSAPI的Javascript冲突?我该如何解决?,javascript,jquery,html,css,Javascript,Jquery,Html,Css,有人能回答为什么jquery在下面不起作用吗 我在谷歌地图上使用的javascript和jquery之间是否存在某种冲突?我如何才能得到它,使它们正常工作?我很确定我已经引用了html中的所有内容 function initialize() { var flightPlanCoordinates = [ new google.maps.LatLng(9.9333, -84.0833), new google.maps.LatLng(10.4714, -84
function initialize() {
var flightPlanCoordinates = [
new google.maps.LatLng(9.9333, -84.0833),
new google.maps.LatLng(10.4714, -84.6454),
new google.maps.LatLng(10.3143, -84.8250),
new google.maps.LatLng(9.8833, -85.5333),
new google.maps.LatLng(9.6500, -85.0667),
new google.maps.LatLng(9.4319, -84.1615),
new google.maps.LatLng(9.9333, -84.0833)
];
var flightPath = new google.maps.Polyline({
path: flightPlanCoordinates,
geodesic: true,
strokeColor: 'blue',
strokeOpacity: 0.5,
strokeWeight: 3
});
flightPath.setMap(map);
google.maps.event.addDomListener(window, "resize", function() {
var center = map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(center);
document.getElementById('map_canvas').style.height = (h*0.4)+"px";
document.getElementById('wrapper2').style.maxHeight = (h-15)+"px";
document.getElementById('info').style.maxHeight = (h-(h*0.4)-15)+"px";
});
}
google.maps.event.addDomListener(window, 'load', initialize);
$(document).ready(function() {
$('photos').hide();
});
什么不起作用?无论如何,
photos
不是一个有效的HTML标记,它应该是。photos
很可能是一个[class selector]。它是一个ID,但你说得对,我不会在里面放一个#!谢谢:)