「MediaWiki:Strapping.js」の版間の差分
(ページの作成:「$(document).ready(function() { $(".fancybox a").click(function() { var href = $(this).attr('href') + '?useskin=bootstrap'; $.fancybox.open({ href : href, ...」) |
|||
(1人の利用者による、間の2版が非表示) | |||
1行: | 1行: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
− | $(".fancybox a").click(function() { | + | $("span.fancybox a").click(function() { |
var href = $(this).attr('href') + '?useskin=bootstrap'; | var href = $(this).attr('href') + '?useskin=bootstrap'; | ||
$.fancybox.open({ | $.fancybox.open({ | ||
href : href, | href : href, | ||
type : 'iframe', | type : 'iframe', | ||
− | padding : 5 | + | padding : 5, |
+ | afterShow : function () { | ||
+ | $(".fancybox-iframe").contents().find("a").attr("onclick", "parent.location.assign(this.href);parent.$.fancybox.close();") | ||
+ | } | ||
}); | }); | ||
+ | return false; | ||
}); | }); | ||
}); | }); |
2016年3月16日 (水) 05:58時点における最新版
$(document).ready(function() { $("span.fancybox a").click(function() { var href = $(this).attr('href') + '?useskin=bootstrap'; $.fancybox.open({ href : href, type : 'iframe', padding : 5, afterShow : function () { $(".fancybox-iframe").contents().find("a").attr("onclick", "parent.location.assign(this.href);parent.$.fancybox.close();") } }); return false; }); });