Created
July 18, 2012 09:22
-
-
Save klmr/3135217 to your computer and use it in GitHub Desktop.
Add slide numbers to Google’s html5slides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createSlideNumbering = function (skipFirstN) { | |
var num = 0; | |
$('.slides article').each(function () { | |
num += 1; | |
if (num <= skipFirstN) | |
return; | |
jQuery('<div/>', { | |
class: 'counter', | |
text: num | |
}).appendTo($(this)); | |
}); | |
} | |
$(window).load(function () { | |
createSlideNumbering(2); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.counter { | |
bottom: 1em; | |
font-size: 0.5em; | |
position: absolute; | |
right: 1em; | |
z-index: 999; | |
} | |
.counter:before { content: '[ '; } | |
.counter:after { content: ' ]'; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment