Skip to content

Commit

Permalink
showing the first slide on pageload, rather than loading it with java…
Browse files Browse the repository at this point in the history
…script
  • Loading branch information
jdan committed Feb 3, 2014
1 parent 6ac6d51 commit fcf4fb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/cleaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Cleaver.prototype.renderSlides = function () {
for (i = 1; i < slices.length; i++) {
this.slides.push({
id: i,
hidden: i !== 1, // first slide is visible
content: this.renderSlide(slices[i])
});
}
Expand All @@ -86,6 +87,7 @@ Cleaver.prototype.renderSlides = function () {

this.slides.push({
id: i,
hidden: true,
content: this.renderAuthorSlide(this.metadata.author)
});
}
Expand Down
2 changes: 0 additions & 2 deletions resources/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ function updateTabIndex() {
}

window.onload = function () {
/* Reveal the first slide */
document.getElementById('slide-1').classList.remove('hidden');

// Update the tabindex to prevent weird slide transitioning
updateTabIndex();
Expand Down
2 changes: 1 addition & 1 deletion templates/default.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{/progress}}

{{#slides}}
<div class="slide hidden" id="slide-{{id}}">
<div class="slide{{#hidden}} hidden{{/hidden}}" id="slide-{{id}}">
<section class="slide-content">{{{content}}}</section>
</div>
{{/slides}}
Expand Down

0 comments on commit fcf4fb0

Please sign in to comment.