小白求助,我这个视频想要点击封面,弹出小框播放视频的效果,且能关闭,能全屏,哪位大神可以帮我代码改一下,尽量是jquery,谢谢您了
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>video</title>
</head>
<body>
<div id="wrap" style=" width:100%; position:relative;">
<a class="fancybox" href="index-img/video-img/sku360 video.mp4" style=" width:50%;" >
<img src="index-img/video-img/video-img2.png" width="100%" style=" margin:0 auto; overflow:hidden;" alt="" >
</a>
</div>
</body>
<script>
/* <![CDATA[ */
$(document).ready(function () {
$(".fancybox").fancybox({
fitToView: false,
content: '<span></span>', // create temp content
scrolling: 'no',
afterLoad: function () {
var $width = $(this.element).data('width'); // get dimensions from data attributes
var $height = $(this.element).data('height');
this.content = "<embed src='player.swf?file=" + this.href + "&autostart=true&wmode=opaque' type='application/x-shockwave-flash' width='" + $width + "' height='" + $height + "'></embed>"; // replace temp content
}
});
}); // ready
/* ]]> */
</script>
</html>