i am using google search JSAPI in my local search app. Everything works fine in all the browsers except IE 8. The problem is after the specific line of code my jquery base object and google objects are drreferenced.
Its a straight forward code. I am able to reproduce the problm using this jsfiddle.
html code is
<html>
<head>
<title>Test Map</title>
<script src="http://www.google.com/jsapi?" type="text/javascript"></script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>
and JS
$(function() {
alert(1);
google.load('search',1);
alert($);
google.setOnLoadCallback(function() {
alert(2);
});
});
after the line google.load('search',1)
i got the following error
Error: Object doesn't support this property or method
on $
and google
.
This is totally a nightmare. I am fighting with this for hours without a luck. Any IE experts here got an idea?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…