Submit your widget

jQuery horizontal and vertical Timelines slideshow

Created 13 years ago   Views 35331   downloads 7065    Author csslab
jQuery horizontal and vertical Timelines slideshow
View DemoDownload
95
Share |

This simple plugin helps you to give more life to the boring timelines. Supports horizontal and vertical layouts, and you can parameterize the majority of attributes: speed, transparency, etc..

Include the jQuery library and this plugin:

<script src="js/jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="js/jquery.timelinr-0.9.js" type="text/javascript"></script>

Inicialize-it with the default parameters:

<script type="text/javascript">
   $(function(){
      $().timelinr();
   });
</script>

Or configure it as preferred:

<script type="text/javascript"> 
   $(function(){
      $().timelinr({
         orientation: 'horizontal',
         // value: horizontal | vertical, default to horizontal
         containerDiv: '#timeline',
         // value: any HTML tag or #id, default to #timeline
         datesDiv: '#dates',
         // value: any HTML tag or #id, default to #dates
         datesSelectedClass: 'selected',
         // value: any class, default to selected
         datesSpeed: 500,
         // value: integer between 100 and 1000 (recommended), default to 500 (normal)
         issuesDiv : '#issues',
         // value: any HTML tag or #id, default to #issues
         issuesSelectedClass: 'selected',
         // value: any class, default to selected
         issuesSpeed: 200,
         // value: integer between 100 and 1000 (recommended), default to 200 (fast)
         issuesTransparency: 0.2,
         // value: integer between 0 and 1 (recommended), default to 0.2
         issuesTransparencySpeed: 500,
         // value: integer between 100 and 1000 (recommended), default to 500 (normal)
         prevButton: '#prev',
         // value: any HTML tag or #id, default to #prev
         nextButton: '#next',
         // value: any HTML tag or #id, default to #next
         arrowKeys: 'false',
         // value: true/false, default to false
         startAt: 1
         // value: integer, default to 1 (first)
      });
   });
</script>

HTML markup must be as follows:

<div id="timeline">
   <ul id="dates">
      <li><a href="#">date1</a></li>
      <li><a href="#">date2</a></li>
   </ul>
   <ul id="issues">
      <li id="date1">
         <p>Lorem ipsum.</p>
      </li>
      <li id="date2">
         <p>Lorem ipsum.</p>
      </li>
   </ul>
   <a href="#" id="next">+</a> <!-- opcional -->
   <a href="#" id="prev">-</a> <!-- opcional -->
</div>

The article soruce:http://www.csslab.cl/2011/08/18/jquery-timelinr/