我使用波纹管的js代码
<script type="text/javascript">
$(document).ready(function(){
$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
$(".callbacks").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
});
</script>
那么这个波纹管的错误来
TypeError: $(...).colorbox is not a function [Break On This Error]
$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
当我点击视频。直接链接它在页面而不是灯箱效果中打开
您是否包含该插件? –
jQuert冲突.. http://stackoverflow.com/questions/3188262/jquery-noconflict –
是包含的 没有冲突 只有2个js文件存在 http://www.statcounter.com/counter/counter .js文件 和 www.google-analytics.com/analytics.js – Ras4U