这是一款仿优酷三联叠加轮播jquery焦点图特效。该jquery焦点图特效使用三联联播的方式,将图片进行无限循环轮播,效果非常不错。
使用方法
在页面中引入jquery和posterTvGrid.js文件,以及样式文件posterTvGrid.css。
<link rel="stylesheet" type="text/css" href="css/posterTvGrid.css"> <script src="path/to/jquery.min.js" type="text/javascript"></script> <script src="path/toposterTvGrid.js" type="text/javascript"></script>
HTML结构
使用一个空的<div>
作为该焦点图的HTML结构:
<div id="posterTvGrid" style="margin:40px auto 0 auto;"></div>
初始化插件
在页面DOM元素加载完毕之后,使用下面的方法来初始化该焦点图插件。
var posterTvGrid = new posterTvGrid('posterTvGrid',{className: "posterTvGrid"},[ {"img":"images\/1.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/2.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/3.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/4.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/5.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/6.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/7.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/8.jpg","title":"Lorem ipsum dolor sit amet","url":"#"}, {"img":"images\/9.jpg","title":"Lorem ipsum dolor sit amet","url":"#"} ] );