Skip to content

Instantly share code, notes, and snippets.

@klmr
Created July 18, 2012 09:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save klmr/3135217 to your computer and use it in GitHub Desktop.
Save klmr/3135217 to your computer and use it in GitHub Desktop.
Add slide numbers to Google’s html5slides
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);
});
.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