将 onclick 新窗口转换为 onclick 花式框?
获得了用于显示 facebook 照片的免费代码,它很棒,但它会打开一个新窗口,但它并不能真正做到公正,希望将其转换为打开一个花式框,而不是任何帮助。“代码如下”
完整网址 = http://www.footfalldigital.co.uk/fbalbum.html
提前感谢李“我有一天会给你买一品脱”
<script language="javascript" type="text/javascript">
function popitup(url) {
newwindow=window.open(url,'name','height=450,width=600,location=1,toolbar=1,status=1,resizable=1')
if (window.focus) {newwindow.focus()}
return false;
}
</script>
<script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
<!-------ENTER YOUR FACEBOOK ALBUM IDS HERE------->
var id1 = "444691594416";
var id2 = "";
var id3 = "";
var id4 = "";
var id5 = "";
<!----------------------------------------------->
function fbFetch1(){
var url = "https://graph.facebook.com/" + id1 + "/photos&callback=?&limit=0";
$.getJSON(url,function(json){
var html = "";
$.each(json.data,function(i,fb){
var name = "";
if (fb.name !== undefined){
var name = fb.name;}
html += "<a onclick=\"return popitup('" + fb.source + "')\"><img style='margin:5px;padding:0px;cursor:pointer;vertical-align:middle;' src=" + fb.picture + " title=\"" + name + "\"></a>"; });
html += "";
$('.facebookfeed1').animate({opacity:0}, 500, function(){
$('.facebookfeed1').html(html);});
$('.facebookfeed1').animate({opacity:1}, 500);}
);
};
function fbFetch2(){