可以拖动的水平时间线效果
XML/HTML Code
- <div style="max-width:400px;">
- <div id="timeline"></div>
- </div>
JavaScript Code
- <script>
- const data = [
- { label: "freejs.net", date: "7-04-2019", iconId: 0 },
- { label: "CSSSCRIPT", date: "11-04-2019", iconId: 1 },
- { label: "A Timeline Plugin", date: "08-04-2019", iconId: 2 },
- { label: "My Own Event", date: "10-07-2019", iconId: 3 },
- { label: "The Last Event", date: "10-09-2019", iconId: 4 }
- ];
- const options = {
- iconClasses: {
- 0: "fas fa-layer-group",
- 1: "fas fa-wrench",
- 2: "fas fa-user-plus",
- 3: "far fa-paper-plane",
- 4: "fas fa-user-minus"
- }
- };
- $("#timeline").loadTimeline(data, options);
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_831.html