Jquery FancyBox iframe不是';t加载PHP页面

Jquery FancyBox iframe不是';t加载PHP页面,jquery,iframe,Jquery,Iframe,我在这里看过一些帖子,但我似乎找不到解决我问题的方法。我正在尝试让FancyBox加载我的php页面。我有一个html页面加载非常好,但这个PHP页面没有加载。请帮忙 这是jquery代码 <script type="text/javascript"> <!--var $= jQuery.noConflict();--> var $ = jQuery.noConflict(); $(document).ready(function() {

我在这里看过一些帖子,但我似乎找不到解决我问题的方法。我正在尝试让FancyBox加载我的php页面。我有一个html页面加载非常好,但这个PHP页面没有加载。请帮忙

这是jquery代码

<script type="text/javascript">
    <!--var $= jQuery.noConflict();-->
    var $ = jQuery.noConflict();
    $(document).ready(function() {
        /*
         *  Simple image gallery. Uses default settings
         */

        $('.fancybox').fancybox();

        /*
         *  Different effects
         */

        // Change title type, overlay closing speed
        $(".fancybox-effects-a").fancybox({
            helpers: {
                title : {
                    type : 'outside'
                },
                overlay : {
                    speedOut : 0
                }
            }
        });

        // Disable opening and closing animations, change title type
        $(".fancybox-effects-b").fancybox({
            openEffect  : 'none',
            closeEffect : 'none',

            helpers : {
                title : {
                    type : 'over'
                }
            }
        });

        // Set custom style, close if clicked, change title type and 
        overlay color
        $(".fancybox-effects-c").fancybox({
            wrapCSS    : 'fancybox-custom',
            closeClick : true,

            openEffect : 'none',

            helpers : {
                title : {
                    type : 'inside'
                },
                overlay : {
                    css : {
                        'background' : 'rgba(238,238,238,0.85)'
                    }
                }
            }
        });

        // Remove padding, set opening and closing animations, close if 
        clicked and disable overlay
        $(".fancybox-effects-d").fancybox({
            padding: 0,

            openEffect : 'elastic',
            openSpeed  : 150,

            closeEffect : 'elastic',
            closeSpeed  : 150,

            closeClick : true,

            helpers : {
                overlay : null
            }
        });

        /*
         *  Button helper. Disable animations, hide close button, change 
        title type and content
         */

        $('.fancybox-buttons').fancybox({
            openEffect  : 'none',
            closeEffect : 'none',

            prevEffect : 'none',
            nextEffect : 'none',

            closeBtn  : false,

            helpers : {
                title : {
                    type : 'inside'
                },
                buttons : {}
            },

            afterLoad : function() {
                this.title = 'Image ' + (this.index + 1) + ' of ' + 
             this.group.length + (this.title ? ' - ' + this.title : '');
            }
        });


        /*
         *  Thumbnail helper. Disable animations, hide close button, 
            arrows and slide to next gallery item if clicked
         */

        $('.fancybox-thumbs').fancybox({
            prevEffect : 'none',
            nextEffect : 'none',

            closeBtn  : false,
            arrows    : false,
            nextClick : true,

            helpers : {
                thumbs : {
                    width  : 50,
                    height : 50
                }
            }
        });

        /*
         *  Media helper. Group items, disable animations, hide arrows, 
            enable media and button helpers.
        */
        $('.fancybox-media')
            .attr('rel', 'media-gallery')
            .fancybox({
                openEffect : 'none',
                closeEffect : 'none',
                prevEffect : 'none',
                nextEffect : 'none',

                arrows : false,
                helpers : {
                    media : {},
                    buttons : {}
                }
            });

        /*
         *  Open manually
         */

        $("#fancybox-manual-a").click(function() {
            $.fancybox.open('1_b.jpg');
        });

        $("#fancybox-manual-b").click(function() {
            $.fancybox.open({
                href : '/wp-content/themes/listings/login.php',
                type : 'iframe',
                padding : 5
            });
        });

        $("#fancybox-manual-c").click(function() {
            $.fancybox.open([
                {
                    href : '1_b.jpg',
                    title : 'My title'
                }, {
                    href : '2_b.jpg',
                    title : '2nd title'
                }, {
                    href : '3_b.jpg'
                }
            ], {
                helpers : {
                    thumbs : {
                        width: 75,
                        height: 50
                    }
                }
            });
        });


    });
</script>

var$=jQuery.noConflict();
$(文档).ready(函数(){
/*
*简单图像库。使用默认设置
*/
$('.fancybox').fancybox();
/*
*不同效果
*/
//更改标题类型、覆盖关闭速度
$(“.fancybox-effects-a”).fancybox({
助手:{
标题:{
类型:“外部”
},
覆盖:{
加速输出:0
}
}
});
//禁用打开和关闭动画,更改标题类型
$(“.fancybox-effects-b”).fancybox({
openEffect:'无',
closeEffect:'无',
助手:{
标题:{
键入:“结束”
}
}
});
//设置自定义样式,单击后关闭,更改标题类型和
外罩颜色
$(“.fancybox-effects-c”).fancybox({
wrapCSS:“fancybox定制”,
closeClick:true,
openEffect:'无',
助手:{
标题:{
类型:“内部”
},
覆盖:{
css:{
‘背景’:‘rgba(238,0.85)’
}
}
}
});
//删除填充,设置打开和关闭动画,如果需要,关闭
单击并禁用覆盖
$(“.fancybox-effects-d”).fancybox({
填充:0,
openEffect:'弹性',
开放速度:150,
闭合效应:“弹性”,
接近速度:150,
closeClick:true,
助手:{
覆盖:空
}
});
/*
*按钮助手。禁用动画,隐藏关闭按钮,更改
标题类型和内容
*/
$('.fancybox按钮').fancybox({
openEffect:'无',
closeEffect:'无',
效果:“无”,
下一个效果:“无”,
closeBtn:false,
助手:{
标题:{
类型:“内部”
},
按钮:{}
},
后加载:函数(){
this.title='Image'+(this.index+1)+'of'+
this.group.length+(this.title?'-'+this.title:“”);
}
});
/*
*缩略图助手。禁用动画,隐藏关闭按钮,
箭头并滑动到下一个库项目(如果单击)
*/
$('.fancybox拇指')。fancybox({
效果:“无”,
下一个效果:“无”,
closeBtn:false,
箭头:错,
下一步:没错,
助手:{
拇指:{
宽度:50,
身高:50
}
}
});
/*
*媒体助手。分组项目、禁用动画、隐藏箭头、,
启用媒体和按钮帮助程序。
*/
$(“.fancybox媒体”)
.attr('rel','media gallery')
.fancybox({
openEffect:'无',
closeEffect:'无',
效果:“无”,
下一个效果:“无”,
箭头:错,
助手:{
媒体:{},
按钮:{}
}
});
/*
*手动打开
*/
$(“#fancybox-manual-a”)。单击(函数(){
$.fancybox.open('1_b.jpg');
});
$(“#fancybox-manual-b”)。单击(函数(){
$.fancybox.open({
href:'/wp content/themes/listings/login.php',
键入:“iframe”,
填充:5
});
});
$(“#fancybox-manual-c”)。单击(函数(){
$.fancybox.open([
{
href:'1_b.jpg',
标题:“我的标题”
}, {
href:'2_b.jpg',
标题:“第二名”
}, {
href:'3_b.jpg'
}
], {
助手:{
拇指:{
宽度:75,
身高:50
}
}
});
});
});
这是我尝试打开iframe的地方

<div class="button-link" style="float:left"> <a href="<?php echo 
get_template_directory();?>/login.php" class="fancybox 
fancybox.iframe">Sign In &raquo;</a></div><div class="button-link" 
style="float:left; margin-right:15px"><a href="#"> &laquo; Sign Up </a>
</div></div>


我需要添加回我获取的jquery include文件

如果这正是您运行的代码,则会出现javascript错误,导致脚本停止运行。检查开发工具控制台上的错误(大多数浏览器中都是F12)。好吧,我看到了这个错误(索引):629UncaughtTypeError:$(…)。fancybox不是一个函数,我添加了fancybox插件,现在它又摆脱了这个错误。我该如何解决这个问题???你记得包括fancybox的源代码吗?我以前把它们包括在标题中,但它们没有显示在页面上。所以我安装了插件。当我这么做的时候,所有的画廊都在做iframe的东西,所以我觉得这很好。疯狂的是html页面会加载,现在什么都没有加载。