下载地址: http://www./jQuery/Layout-Interface/2014100884.html jquery.jqtimeline是一个简单、轻量级、优雅的用于记录重大事件的时间轴插件。它使用json数组来记录数据。这个插件能够很容易的集成到其他jQuery插件中,可用于创建社交应用、博客时间轴、公司事务时间表等。
使用方法
在页面中引入jquery.timeline.js和jquery.timeline.css
<!-- Include necessary files -->
< link rel = "stylesheet" type = "text/css" href = "css/jquery.timeline.css" />
< script type = "text/javascript" src = "js/jquery.timeline.js" ></ script >
|
创建一个div 用于放置时间轴
<!-- Create a div to be used as container for our timeline. -->
< div id = "myTimeline" ></ div >
|
调用时间轴
<script type= "text/javascript" src= "js/jquery.timeline.js" >
// Create an array of event object. Events can be added and deleted dynamically
var ev = [{id:1, name: 'I used jqtimeline plugin.' , on : new Date() }];
//Call the plugin constructor
$( '#myTimeline' ).jqtimeline({events:ev});
</script>
|
|