Skip to content

DanielePetrarolo/flaTimeline.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flaTimeline.js

A responsive, animated and customizable flat timeline. :)

Introduction

A simple jQuery plugin to create a responsive, animated and customizable timeline with a flat style.

How it works?

  • First of all include jQuery in your project, than add jquery.flatimeline.js and jquery.flatimeline.css to make the timeline works
 <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> 
 <script type="text/javascript" src="assets/js/jquery.flatimeline.js"></script> 
 <link type="text/css" rel="stylesheet" href="assets/css/jquery.flatimeline.css" />
  • Now, create a super-simple semantic HTML list:
<ul class="flaTimeline"> 
  <li class="event"> 
    <div class="date">The date of your event</div> 
    <div class="content"> 
      <div class="title">The title of your event</div> 
      <div class="text">The content of your event</div> 
    </div> 
  </li>
  <li class="event"> 
    <div class="date">The date of your event</div> 
    <div class="content"> 
      <div class="title">The title of your event</div> 
      <div class="text">The content of your event</div> 
    </div> 
  </li>
</ul>
  • "Let her go!" [cit. Passenger]
<script type="text/javascript"> 
  $(document).ready(function(){ 
    $('ul.flaTimeline').flaTimeline(); 
  }); 
</script>

Options

Name Type Default Description
toggle boolean true Set if a single event can be open or not.
toggleSpeed numeric 300 Set the speed of the animation that open the event to show its description.
toggleEasing easing swing Set the easing of the animation that open the event to show its description.
eventColor color #999 Set the color of the events box. A darker color is auto-sets for their bottom.
gridColor color #DDD Set the color of the timeline's grid.
borderRadius pixel 0px Set the border radius of the events box.
onStart function - Set a function that start at the begin of every opening/closing event.
onComplete function - Set a function that start at the end of every opening/closing event.
onOpeningStart function - Set a function that start when the opening event is started.
onOpeningComplete function - Set a function that start when the opening event is completed.
onClosingStart function - Set a function that start when the closing event is started.
onClosingComplete function - Set a function that start when the closing event is completed.

License

Copyright (c) 2014 Daniele Petrarolo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A responsive, animated and customizable flat timeline.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published