diff --git a/README.md b/README.md index 6a4961a6e1d91c02adb07f8e5484744ad9592aee..3ef9c04d6fc2846c4a4bc4da9c941daf217649fc 100644 --- a/README.md +++ b/README.md @@ -499,6 +499,13 @@ By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/ </section> ``` +### Slide number +If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value. + +```javascript +Reveal.configure({ slideNumber: true }); +``` + ### Overview mode diff --git a/test/test.js b/test/test.js index 36983c86818f365d9bb8b2939e8bb46ebe3a359b..f620b5bd9b23824d19c9233e03616eb13410fec9 100644 --- a/test/test.js +++ b/test/test.js @@ -11,6 +11,22 @@ Reveal.addEventListener( 'ready', function() { + // --------------------------------------------------------------- + // DOM TESTS + + QUnit.module( 'DOM' ); + + test( 'Initial slides classes', function() { + var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' ) + + strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' ); + strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' ); + strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' ); + + strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' ); + + ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' ); + }); // --------------------------------------------------------------- // API TESTS