google map embeds
This commit is contained in:
parent
671bef145a
commit
9af165358f
|
@ -18,6 +18,21 @@ $(function() {
|
|||
if ($('.imageGallery').length > 0) {
|
||||
$('.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>
|
||||
</head>
|
||||
|
|
Loading…
Reference in New Issue
Block a user