This time I will share jQuery Plugin and tutorial about Easy Responsive jQuery Timeline Plugin – TimelineMe, hope it will help you in programming stack.
TimelineMe is a simple-to-use jQuery plugin for rendering a fully responsive timeline on the webpage that works perfectly with most front-end frameworks such as Bootstrap, Foundation and Materialize.
How to use it:
1. Include the required stylesheet jquery.timelineMe.css
in the head
section, and the JavaScript file jquery.timelineMe.js
at the bottom of the document.
1 |
< link rel = "stylesheet" href = "css/jquery.timelineMe.css" > |
3 |
< script src = "//code.jquery.com/jquery-2.1.4.min.js" ></ script > |
4 |
< script src = "js/jquery.timelineMe.js" ></ script > |
2. Create an DOM element where plugin is applied.
1 |
< div id = "timeline-container" ></ div > |
3. Add your custom events to the timeline.
06 |
shortContent: 'short desc MS' , |
07 |
fullContent: 'big desc MS' , |
14 |
shortContent: 'short desc SI' , |
16 |
showMore: 'show more' , |
21 |
label: '<span style="background-color: #7DD7DD;">my label</span>' , |
22 |
shortContent: 'short desc BI' , |
24 |
showMore: 'show more' , |
4. Initialize the plugin.
1 |
$( '#timeline-container' ).timelineMe({items: events}); |
5. Public methods.
2 |
$( '#timeline-container' ).timelineMe(); |
5 |
$( '#timeline-container' ).timelineMe( "destroy" ); |
8 |
$( '#timeline-container' ).timelineMe( "getItem" ); |
6. All possible options.
01 |
orientation : 'vertical' , |
04 |
contentDimensionValue : '400px' , |
05 |
labelDimensionValue : '200px' , |
09 |
leftArrowElm : undefined, |
10 |
rightArrowElm : undefined |
Change logs:
2016-04-11
- add a way to handle html templates
2016-03-17
2016-03-09
- allows to set custom arrows
2016-02-24
- Works with collapsible items
2016-02-15
- Continue horizontal mode implementation: work on scroll bar & zones
2016-02-05
- Change timeline thickness as sass variable
2016-01-01
- Change timeline thickness as sass variable
2015-10-09
- Delete buggy line for height check, and update version
2015-10-04
- Change label’s point element from pseudo-element to a real element that could contain a pictogram. Enhance SCSS file to have a better control through variables.
This awesome jQuery plugin is developed by mickaelr. For more Advanced Usages, please check the demo page or visit the official website.