jquery.timelinr.js是一款效果异常炫酷的jQuery时间轴插件。jquery.timelinr可以制作水平和垂直时间轴效果,而且可以举行自动播放。你可以通过参数来控制每次时间轴切换的动画效果。
包罗jQuery库和此插件:
<script src="js/jquery-1.x.x.min.js"></script> <script src="js/jquery.timelinr-x.x.x.js"></script>
使用默认参数举行初始化:
$(function(){ $().timelinr(); });
或将其设置为首选:
$(function(){ $().timelinr({ orientation: 'horizontal', // value: horizontal | vertical, default to horizontal containerDiv: '#timeline', // value: any HTML tag or #id, default to #timeline datesDiv: '#dates', // value: any HTML tag or #id, default to #dates datesSelectedClass: 'selected', // value: any class, default to selected datesSpeed: 'normal', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to normal issuesDiv : '#issues', // value: any HTML tag or #id, default to #issues issuesSelectedClass: 'selected', // value: any class, default to selected issuesSpeed: 'fast', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to fast issuesTransparency: 0.2, // value: integer between 0 and 1 (recommended), default to 0.2 issuesTransparencySpeed: 500, // value: integer between 100 and 1000 (recommended), default to 500 (normal) prevButton: '#prev', // value: any HTML tag or #id, default to #prev nextButton: '#next', // value: any HTML tag or #id, default to #next arrowKeys: 'false', // value: true/false, default to false startAt: 1, // value: integer, default to 1 (first) autoPlay: 'false', // value: true | false, default to false autoPlayDirection: 'forward', // value: forward | backward, default to forward autoPlayPause: 2000 // value: integer (1000 = 1 seg), default to 2000 (2segs)< }); });
HTML如下:
<div id="timeline"> <ul id="dates"> <li><a href="/go/?url=#" class="target" rel="external nofollow">date1</a></li> <li><a href="/go/?url=#" class="target" rel="external nofollow">date2</a></li> </ul> <ul id="issues"> <li id="date1"> <p>Lorem ipsum.</p> </li> <li id="date2"> <p>Lorem ipsum.</p> </li> </ul> <a href="/go/?url=#" class="target" rel="external nofollow" id="next">+</a> <!-- optional --> <a href="/go/?url=#" class="target" rel="external nofollow" id="prev">-</a> <!-- optional --> </div>
1.阿里云: 本站现在使用的是阿里云主机,平安/可靠/稳固。点击领取2000米代金券、领会最新阿里云产物的种种优惠流动点击进入
2.腾讯云: 提供云服务器、云数据库、云存储、视频与CDN、域名等服务。腾讯云各种产物的最新流动,优惠券领取点击进入
3.广告同盟: 整理了现在主流的广告同盟平台,若是你有流量,可以作为参考选择适合你的平台点击进入
链接: http://www.fly63.com/nav/2730