I am getting "is null" errors on a jQuery fancybox install here
Here is the jquery:
<script type="text/javascript">
$(document).ready(function() {
$("a.video").fancybox({
'zoomOpacity' : true,
'overlayShow' : false,
'zoomSpeedIn' : 500,
'zoomSpeedOut' : 500
});
});
</script>
Here is the html portion:
<a class="video" href="#testube"><img src="images/v开发者_运维百科ideo.jpg" alt="Idea People Video" /></a>
<div style="display:none" id="testube">
<object width="560" height="340">
<param name="movie" value="http://www.youtube.com/v/9VUhmErOxwk&hl=en_US&fs=1&rel=0"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/9VUhmErOxwk&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed>
</object>
</div>
Would appreciate some help figuring out why I get the error and no popup video.
Thanks.
You have a conflict with $ on the page since prototype is being included on the page as well, this will work since $ is taken over by prototype:
jQuery(function() {
jQuery("a.video").fancybox({
'zoomOpacity' : true,
'overlayShow' : false,
'zoomSpeedIn' : 500,
'zoomSpeedOut' : 500
});
});
精彩评论