Skip to content

Commit

Permalink
New version 0.9.6
Browse files Browse the repository at this point in the history
- check if required elements exist on page before initializing timelinr
| tnx @kevindb
- documentation updated
- examples updated
  • Loading branch information
juanbrujo committed Feb 2, 2016
1 parent 58b0155 commit 1311f8e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Configuration:

Include the jQuery library and this plugin:

<script src="js/jquery-1.6.1.min.js"></script>
<script src="js/jquery.timelinr-0.9.js"></script>
<script src="js/jquery-1.x.x.min.js"></script>
<script src="js/jquery.timelinr-0.9.x.js"></script>

Inicialize-it with the default parameters:

Expand Down
6 changes: 3 additions & 3 deletions autoplay.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="Made with ❤ by Jorge Epuñan - @csslab">

<title>jQuery Timeline 0.9.54 - Dando vida al tiempo</title>
<title>jQuery Timelinr - Dando vida al tiempo</title>
<link rel="stylesheet" href="css/style.css" media="screen" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/jquery.timelinr-0.9.54.js"></script>
<script src="js/jquery.timelinr-0.9.6.js"></script>
<script>
$(function(){
$().timelinr({
Expand Down Expand Up @@ -92,7 +92,7 @@ <h1>2011</h1>
<a href="#" id="prev">-</a>
</div>

<h1>CSSLab.cl - jQuery Timeline 0.9.54 - Horizontal <a href="http://www.csslab.cl/2011/08/18/jquery-timelinr/" title="Volver al artículo original">[Volver/Back]</a></h1>
<h1>CSSLab.cl - jQuery Timelinr - Horizontal <a href="http://www.csslab.cl/2011/08/18/jquery-timelinr/" title="Volver al artículo original">[Volver/Back]</a></h1>
<h2>&copy; 2013 CSSLab.cl</h2>

</body>
Expand Down
6 changes: 3 additions & 3 deletions horizontal.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="Made with ❤ by Jorge Epuñan - @csslab">

<title>jQuery Timeline 0.9.54 - Dando vida al tiempo</title>
<title>jQuery Timelinr - Dando vida al tiempo</title>
<link rel="stylesheet" href="css/style.css" media="screen" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/jquery.timelinr-0.9.54.js"></script>
<script src="js/jquery.timelinr-0.9.6.js"></script>
<script>
$(function(){
$().timelinr({
Expand Down Expand Up @@ -91,7 +91,7 @@ <h1>2011</h1>
<a href="#" id="prev">-</a>
</div>

<h1>CSSLab.cl - jQuery Timeline 0.9.54 - Horizontal <a href="http://www.csslab.cl/2011/08/18/jquery-timelinr/" title="Volver al artículo original">[Volver/Back]</a></h1>
<h1>CSSLab.cl - jQuery Timelinr - Horizontal <a href="http://www.csslab.cl/2011/08/18/jquery-timelinr/" title="Volver al artículo original">[Volver/Back]</a></h1>
<h2>&copy; 2013 CSSLab.cl</h2>

</body>
Expand Down
40 changes: 20 additions & 20 deletions js/jquery.timelinr-0.9.54.js → js/jquery.timelinr-0.9.6.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ----------------------------------
jQuery Timelinr 0.9.54
jQuery Timelinr 0.9.55
tested with jQuery v1.6+
Copyright 2011, CSSLab.cl
Expand All @@ -12,27 +12,27 @@ instructions: http://www.csslab.cl/2011/08/18/jquery-timelinr/
jQuery.fn.timelinr = function(options){
// default plugin settings
settings = jQuery.extend({
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: 'normal', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to normal
issuesDiv: '#issues', // value: any HTML tag or #id, default to #issues
issuesSelectedClass: 'selected', // value: any class, default to selected
issuesSpeed: 'fast', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to 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)
autoPlay: 'false', // value: true | false, default to false
autoPlayDirection: 'forward', // value: forward | backward, default to forward
autoPlayPause: 2000 // value: integer (1000 = 1 seg), default to 2000 (2segs)
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: 'normal', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to normal
issuesDiv: '#issues', // value: any HTML tag or #id, default to #issues
issuesSelectedClass: 'selected', // value: any class, default to selected
issuesSpeed: 'fast', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to 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)
autoPlay: 'false', // value: true | false, default to false
autoPlayDirection: 'forward', // value: forward | backward, default to forward
autoPlayPause: 2000 // value: integer (1000 = 1 seg), default to 2000 (2segs)
}, options);

$(function(){
// Checks if required elements exist on page before initializing timelinr
// Checks if required elements exist on page before initializing timelinr | improvement since 0.9.55
if ($(settings.datesDiv).length > 0 && $(settings.issuesDiv).length > 0) {
// setting variables... many of them
var howManyDates = $(settings.datesDiv+' li').length;
Expand Down Expand Up @@ -270,4 +270,4 @@ function autoPlay(){
currentDate.parent().prev().find('a').trigger('click');
}
}
}
}
8 changes: 4 additions & 4 deletions vertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="Made with ❤ by Jorge Epuñan - @csslab">

<title>jQuery Timeline 0.9.54 - Dando vida al tiempo</title>
<title>jQuery Timelinr - Dando vida al tiempo</title>
<link rel="stylesheet" href="css/style_v.css" media="screen" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/jquery.timelinr-0.9.54.js"></script>
<script src="js/jquery.timelinr-0.9.6.js"></script>
<script>
$(function(){
$().timelinr({
orientation: 'vertical',
issuesSpeed: 300,
datesSpeed: 100,
arrowKeys: 'true',
startAt: 3
startAt: 3
})
});
</script>
Expand Down Expand Up @@ -96,7 +96,7 @@ <h1>2011</h1>
<a href="#" id="prev">-</a>
</div>

<h1>CSSLab.cl - jQuery Timeline 0.9.54 - Horizontal <a href="http://www.csslab.cl/2011/08/18/jquery-timelinr/" title="Volver al artículo original">[Volver/Back]</a></h1>
<h1>CSSLab.cl - jQuery Timelinr - Horizontal <a href="http://www.csslab.cl/2011/08/18/jquery-timelinr/" title="Volver al artículo original">[Volver/Back]</a></h1>
<h2>&copy; 2013 CSSLab.cl</h2>


Expand Down

0 comments on commit 1311f8e

Please sign in to comment.