This time I will share jQuery Plugin and tutorial about Animated Timeline Slider Plugin For jQuery – Timeline.js, hope it will help you in programming stack.
Yet another jQuery timeline plugin used for creating an interactive horizontal (or vertical) timeline slider to describe a sequence of events. Your users are able to navigate between timeline events just like a slider. Mobile compatibility, date timeline slider, autoplay and navigation buttons are coming soon.
How to use it:
1. Load the required JavaScript and CSS files as displayed below into your html document.
1 |
< link href = "timeline.css" rel = "stylesheet" > |
2 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
3 |
< script src = "timeline.js" ></ script > |
2. Add your custom events to the timeline slider following the html structure as this:
01 |
< div class = "timeline timeline-demo" > |
02 |
< div data-time = "2012" > |
03 |
< div class = "timeline-visual" > < img src = "1.jpg" alt = "" > </ div > |
04 |
< div class = "timeline-detail" > |
05 |
< ul class = "timeline-detail-list" > |
10 |
< div data-time = "2013" > |
11 |
< div class = "timeline-visual" > < img src = "2.jpg" alt = "" > </ div > |
12 |
< div class = "timeline-detail" > |
13 |
< ul class = "timeline-detail-list" > |
18 |
< div data-time = "2014" > |
19 |
< div class = "timeline-visual" > < img src = "3.jpg" alt = "" > </ div > |
20 |
< div class = "timeline-detail" > |
21 |
< ul class = "timeline-detail-list" > |
26 |
< div data-time = "2015" > |
27 |
< div class = "timeline-visual" > < img src = "4.jpg" alt = "" > </ div > |
28 |
< div class = "timeline-detail" > |
29 |
< ul class = "timeline-detail-list" > |
34 |
< div data-time = "2016" > |
35 |
< div class = "timeline-visual" > < img src = "5.jpg" alt = "" > </ div > |
36 |
< div class = "timeline-detail" > |
37 |
< ul class = "timeline-detail-list" > |
42 |
< div data-time = "2017" > |
43 |
< div class = "timeline-visual" > < img src = "6.jpg" alt = "" > </ div > |
44 |
< div class = "timeline-detail" > |
45 |
< ul class = "timeline-detail-list" > |
3. Initialize the timeline slider and you’re done.
4. Possible options for the timeline slider.
01 |
$( '.timeline-demo' ).Timeline({ |
04 |
itemClass: 'timeline-item' , |
05 |
dotsClass: 'timeline-dots' , |
06 |
activeClass: 'slide-active' , |
07 |
prevClass: 'slide-prev' , |
08 |
nextClass: 'slide-next' , |
10 |
dotsPosition: 'bottom' , |
13 |
customPaging: function (slider, date) { |
14 |
return $( '<button type="button" role="button" />' ).text(date); |
Change log:
2017-05-28
2017-05-02
- Remove object definition and remove file space
This awesome jQuery plugin is developed by ilkeryilmaz. For more Advanced Usages, please check the demo page or visit the official website.