google map embeds

This commit is contained in:
sanj 2011-01-02 17:19:49 +05:30
parent 9af165358f
commit 2b53746209

View File

@ -23,13 +23,13 @@ $(function() {
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 iframe = $('<iframe />').attr("src", embedUrl).attr("width", "425").attr("height", "350");
var parentP = t.parents('p');
parentP.append(iframe);
parentP.append("<br />").append(iframe);
t.toggle(function() {
iframe.slideDown();
iframe.slideUp();
}, function() {
iframe.slideUp();
iframe.slideDown();
});
}
});