Skip to content
Snippets Groups Projects
Commit 421b78aa authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

ability to define autoSlide duration per slide

parent ed1db1f3
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ Reveal.initialize({ ...@@ -76,7 +76,7 @@ Reveal.initialize({
// Number of milliseconds between automatically proceeding to the // Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten // next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoSlide attribute on your slides // by using a data-duration attribute on your slides
autoSlide: 0, autoSlide: 0,
// Enable slide navigation via mouse wheel // Enable slide navigation via mouse wheel
......
/*! /*!
* reveal.js 2.1 r31 * reveal.js 2.1 r32
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
...@@ -34,7 +34,7 @@ var Reveal = (function(){ ...@@ -34,7 +34,7 @@ var Reveal = (function(){
// Number of milliseconds between automatically proceeding to the // Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten // next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoSlide attribute on your slides // by using a data-duration attribute on your slides
autoSlide: 0, autoSlide: 0,
// Enable slide navigation via mouse wheel // Enable slide navigation via mouse wheel
...@@ -53,7 +53,7 @@ var Reveal = (function(){ ...@@ -53,7 +53,7 @@ var Reveal = (function(){
dependencies: [] dependencies: []
}, },
// stores if the next slide should be shown automatically // Stores if the next slide should be shown automatically
// after n milliseconds // after n milliseconds
autoSlide = config.autoSlide, autoSlide = config.autoSlide,
...@@ -845,11 +845,11 @@ var Reveal = (function(){ ...@@ -845,11 +845,11 @@ var Reveal = (function(){
state = state.concat( slideState.split( ' ' ) ); state = state.concat( slideState.split( ' ' ) );
} }
// if this slide has a autoSlide attribtue associated use this as autoSlide value // If this slide has a data-duration attribtue associated use this as
// otherwise use the global configured time // autoSlide value otherwise use the global configured time
var slideAutoSlide = slides[index].getAttribute( 'data-autoslide' ); var slideAutoSlide = slides[index].getAttribute( 'data-duration' );
if( slideAutoSlide ) { if( slideAutoSlide ) {
autoSlide = parseInt(slideAutoSlide); autoSlide = parseInt( slideAutoSlide );
} else { } else {
autoSlide = config.autoSlide autoSlide = config.autoSlide
} }
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment