我使用 jQuery 1.7 我的网站,我需要在灯箱中显示谷歌地图。
例如:http ://dev.visualdrugs.net/mootools/gmapsoverlay/
你能帮我用jQuery做同样的事情吗?
谢谢
我使用 jQuery 1.7 我的网站,我需要在灯箱中显示谷歌地图。
例如:http ://dev.visualdrugs.net/mootools/gmapsoverlay/
你能帮我用jQuery做同样的事情吗?
谢谢
下面是一些关于使用 jQuery Colorbox 执行此操作的方法的说明的链接:
http://www.primecut.gr/2011/06/colorbox-with-google-maps/
这是一些简单的代码。这需要 jQuery 和Colorbox 插件(JavaScript 和 CSS)。
HTML
<a class="googleMapPopUp" href="https://maps.google.com.au/maps?q=south+australia" target="_blank">
View location map
</a>
JavaScript
$('.googleMapPopUp').each(function() {
var thisPopup = $(this);
thisPopup.colorbox({
iframe: true,
innerWidth: 400,
innerHeight: 300,
opacity: 0.7,
href: thisPopup.attr('href') + '&ie=UTF8&t=h&output=embed'
});
});