google map embeds
This commit is contained in:
parent
671bef145a
commit
9af165358f
|
@ -18,6 +18,21 @@ $(function() {
|
||||||
if ($('.imageGallery').length > 0) {
|
if ($('.imageGallery').length > 0) {
|
||||||
$('.imageGallery a').fancybox();
|
$('.imageGallery a').fancybox();
|
||||||
}
|
}
|
||||||
|
$('a').each(function() {
|
||||||
|
var t = $(this);
|
||||||
|
var href = t.attr("href");
|
||||||
|
if (href.indexOf("http://maps.google.com") != -1) {
|
||||||
|
var embedUrl = href + "&output=embed";
|
||||||
|
var iframe = $('<iframe />').attr("src", embedUrl).attr("width", "425").attr("height", "350").css({'display': 'none'});
|
||||||
|
var parentP = t.parents('p');
|
||||||
|
parentP.append(iframe);
|
||||||
|
t.toggle(function() {
|
||||||
|
iframe.slideDown();
|
||||||
|
}, function() {
|
||||||
|
iframe.slideUp();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user