我正在使用波纹管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});
当我点击视频链接时,它直接在页面中打开而不是灯箱效果