我使用wordpress并安装了一个名为form-lightbox的插件,但我在chrome的控制台中出错:
未捕获TypeError:对象[object Object]没有方法'fancybox'
在此代码中:
<script type="text/javascript">
var iFrame_1369701509296 = jQuery("#form-lightbox-1369701509296 iframe").attr("src");
jQuery(document).ready(function() {jQuery(".fl_box-1369701509296").fancybox({
Uncaught TypeError: Object [object Object] has no method 'fancybox'
"type" :"inline",
"href" :"#form-lightbox-1369701509296",
"padding" : 10,"margin" : 20,"opacity" : true,"modal" : false,"scrolling" : "","autoScale" : true,"autoDimensions" : true,"width" : 560,"height" : 340,"centerOnScroll" : false,"hideOnOverlayClick" : true,"hideOnContentClick" : false,"overlayShow" : true,"overlayOpacity" : 0.30,"overlayColor" : "#666","titleShow" : true,"titlePosition" : "outside","transitionIn, transitionOut" : "elastic","speedIn" : 300,"changeSpeed" : 300,"changeFade" : "fast","easingIn, easingOut" : "elastic","showCloseButton" : true,"enableEscapeButton" : true,
"onClosed" : function(){ jQuery("#form-lightbox-1369701509296 iframe").attr("src", iFrame_1369701509296); }
});
setTimeout(function(){
jQuery.fancybox(
jQuery("#form-lightbox-1369701509296").html(), {
"padding" : 10,"margin" : 20,"opacity" : true,"modal" : false,"scrolling" : "","autoScale" : true,"autoDimensions" : true,"width" : 560,"height" : 340,"centerOnScroll" : false,"hideOnOverlayClick" : true,"hideOnContentClick" : false,"overlayShow" : true,"overlayOpacity" : 0.30,"overlayColor" : "#666","titleShow" : true,"titlePosition" : "outside","transitionIn, transitionOut" : "elastic","speedIn" : 300,"changeSpeed" : 300,"changeFade" : "fast","easingIn, easingOut" : "elastic","showCloseButton" : true,"enableEscapeButton" : true,
"onClosed" : function(){ jQuery("#form-lightbox-1369701509296 iframe").attr("src", iFrame_1369701509296); }
}
)
},1000);
});
</script></p>
我无法找到原因导致此错误,因为在源代码中验证:
因为脚本已在wp中加入。
任何人都可以提供帮助吗?
此致